home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / A / add images.cpt / Source_1.c < prev    next >
MacBinary  |  1989-06-22  |  20.0 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Source_1.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Jun 22 11:08:08 1989, modified Thu Jun 22 11:08:08 1989, creator Think C, type ASCII, 19793 bytes "Source_1.c" , at 0x4dd1 406 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 53 6f 75 72 63 65 | 5f 31 2e 63 00 00 00 00 |..Source|_1.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 4d 51 00 | 00 01 96 a0 c6 b1 58 a0 |.....MQ.|......X.|
|00000060| c6 b1 58 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..X.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 fb 97 00 00 |........|........|
|00000080| 2f 2a 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |/* =====|========|
|00000090| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000a0| 3d 3d 3d 3d 3d 3d 0d 0d | 46 69 6c 65 3a 20 53 6f |======..|File: So|
|000000b0| 75 72 63 65 5f 31 2e 63 | 0d 46 75 6e 63 74 69 6f |urce_1.c|.Functio|
|000000c0| 6e 3a 20 48 61 6e 64 6c | 65 20 61 6c 6c 20 6f 70 |n: Handl|e all op|
|000000d0| 65 72 61 74 69 6f 6e 73 | 20 66 6f 72 20 74 68 69 |erations| for thi|
|000000e0| 73 20 77 69 6e 64 6f 77 | 0d 48 69 73 74 6f 72 79 |s window|.History|
|000000f0| 3a 20 34 2f 32 37 2f 38 | 39 20 4f 72 69 67 69 6e |: 4/27/8|9 Origin|
|00000100| 61 6c 20 62 79 20 50 72 | 6f 74 6f 74 79 70 65 72 |al by Pr|ototyper|
|00000110| 2e 0d 0d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |...=====|========|
|00000120| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000130| 3d 3d 3d 3d 20 2a 2f 0d | 0d 23 69 6e 63 6c 75 64 |==== */.|.#includ|
|00000140| 65 20 22 53 6f 75 72 63 | 65 5f 31 2e 68 22 0d 23 |e "Sourc|e_1.h".#|
|00000150| 69 6e 63 6c 75 64 65 20 | 22 70 69 78 5f 69 6f 2e |include |"pix_io.|
|00000160| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 3c 43 6f 6c |h".#incl|ude <Col|
|00000170| 6f 72 54 6f 6f 6c 62 6f | 78 2e 68 3e 0d 23 69 6e |orToolbo|x.h>.#in|
|00000180| 63 6c 75 64 65 20 3c 49 | 4d 35 70 72 6f 74 6f 73 |clude <I|M5protos|
|00000190| 2e 68 3e 0d 0d 65 78 74 | 65 72 6e 20 52 47 42 43 |.h>..ext|ern RGBC|
|000001a0| 6f 6c 6f 72 20 42 6c 61 | 63 6b 52 47 42 2c 20 77 |olor Bla|ckRGB, w|
|000001b0| 68 69 74 65 52 47 42 2c | 20 67 72 61 79 52 47 42 |hiteRGB,| grayRGB|
|000001c0| 3b 0d 65 78 74 65 72 6e | 20 73 68 6f 72 74 20 70 |;.extern| short p|
|000001d0| 69 78 5f 7a 6f 6f 6d 3b | 0d 65 78 74 65 72 6e 20 |ix_zoom;|.extern |
|000001e0| 73 68 6f 72 74 20 73 72 | 63 5f 63 68 61 6e 67 65 |short sr|c_change|
|000001f0| 64 3b 20 2f 2a 20 31 20 | 69 66 20 70 69 63 74 20 |d; /* 1 |if pict |
|00000200| 73 63 72 6f 6c 6c 65 64 | 20 6f 72 20 63 68 61 6e |scrolled| or chan|
|00000210| 67 65 64 2c 20 30 20 6f | 74 68 65 72 77 69 73 65 |ged, 0 o|therwise|
|00000220| 20 2a 2f 0d 0d 43 47 72 | 61 66 50 74 72 20 20 70 | */..CGr|afPtr p|
|00000230| 72 6f 74 6f 6e 5f 62 6d | 61 70 3b 20 2f 2a 20 6f |roton_bm|ap; /* o|
|00000240| 66 66 2d 73 63 72 65 65 | 6e 20 62 69 74 6d 61 70 |ff-scree|n bitmap|
|00000250| 20 6f 66 20 70 72 6f 74 | 6f 6e 20 69 6d 61 67 65 | of prot|on image|
|00000260| 20 2a 2f 0d 50 69 63 48 | 61 6e 64 6c 65 20 70 72 | */.PicH|andle pr|
|00000270| 6f 74 6f 6e 5f 70 69 63 | 3b 20 20 2f 2a 20 68 61 |oton_pic|; /* ha|
|00000280| 6e 64 6c 65 20 74 6f 20 | 50 49 43 54 20 66 6f 72 |ndle to |PICT for|
|00000290| 20 73 6f 75 72 63 65 20 | 31 20 2a 2f 0d 52 65 63 | source |1 */.Rec|
|000002a0| 74 20 70 72 6f 74 6f 6e | 5f 72 65 63 74 3b 20 20 |t proton|_rect; |
|000002b0| 20 20 20 20 2f 2a 20 73 | 69 7a 65 20 6f 66 20 6f | /* s|ize of o|
|000002c0| 66 66 73 63 72 65 65 6e | 20 70 69 63 74 20 2a 2f |ffscreen| pict */|
|000002d0| 0d 57 69 6e 64 6f 77 50 | 74 72 20 70 72 6f 74 6f |.WindowP|tr proto|
|000002e0| 6e 5f 57 69 6e 64 6f 77 | 3b 09 2f 2a 20 57 69 6e |n_Window|;./* Win|
|000002f0| 64 6f 77 20 70 6f 69 6e | 74 65 72 20 2d 2d 20 67 |dow poin|ter -- g|
|00000300| 6c 6f 62 61 6c 20 76 61 | 72 69 61 62 6c 65 20 2a |lobal va|riable *|
|00000310| 2f 0d 0d 73 68 6f 72 74 | 20 73 31 5f 6f 66 66 5f |/..short| s1_off_|
|00000320| 74 6f 70 2c 20 73 31 5f | 6f 66 66 5f 6c 65 66 74 |top, s1_|off_left|
|00000330| 3b 09 2f 2a 20 6f 66 66 | 73 65 74 73 20 6f 6e 20 |;./* off|sets on |
|00000340| 74 68 65 20 77 69 6e 64 | 6f 77 20 66 72 6f 6d 20 |the wind|ow from |
|00000350| 73 63 72 6f 6c 6c 69 6e | 67 20 2a 2f 0d 73 74 61 |scrollin|g */.sta|
|00000360| 74 69 63 20 53 74 72 32 | 35 35 20 66 69 6c 65 6e |tic Str2|55 filen|
|00000370| 61 6d 65 3b 20 2f 2a 20 | 6c 6f 63 61 6c 20 2d 20 |ame; /* |local - |
|00000380| 69 6d 61 67 65 20 66 69 | 6c 65 2c 20 69 66 20 61 |image fi|le, if a|
|00000390| 6e 79 2c 20 61 73 73 6f | 63 69 61 74 65 64 20 77 |ny, asso|ciated w|
|000003a0| 69 74 68 20 74 68 69 73 | 20 77 69 6e 64 6f 77 20 |ith this| window |
|000003b0| 2a 2f 0d 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |*/..stat|ic void |
|000003c0| 64 72 61 77 5f 70 72 6f | 74 6f 6e 28 20 76 6f 69 |draw_pro|ton( voi|
|000003d0| 64 20 29 3b 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |d );..st|atic voi|
|000003e0| 64 20 48 61 6e 64 6c 65 | 56 53 63 72 6f 6c 6c 42 |d Handle|VScrollB|
|000003f0| 61 72 20 28 73 68 6f 72 | 74 20 63 6f 64 65 2c 20 |ar (shor|t code, |
|00000400| 73 68 6f 72 74 20 53 74 | 61 72 74 2c 20 73 68 6f |short St|art, sho|
|00000410| 72 74 20 53 74 6f 70 2c | 0d 09 09 09 09 09 09 09 |rt Stop,|........|
|00000420| 20 20 73 68 6f 72 74 20 | 49 6e 63 72 65 6d 65 6e | short |Incremen|
|00000430| 74 2c 20 73 68 6f 72 74 | 20 4c 49 6e 63 72 65 6d |t, short| LIncrem|
|00000440| 65 6e 74 2c 0d 09 09 09 | 09 09 09 09 20 20 43 6f |ent,....|.... Co|
|00000450| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 20 74 68 65 43 |ntrolHan|dle theC|
|00000460| 6f 6e 74 72 6f 6c 2c 20 | 50 6f 69 6e 74 20 6d 79 |ontrol, |Point my|
|00000470| 50 74 29 3b 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |Pt);..st|atic voi|
|00000480| 64 20 48 61 6e 64 6c 65 | 48 53 63 72 6f 6c 6c 42 |d Handle|HScrollB|
|00000490| 61 72 20 28 73 68 6f 72 | 74 20 63 6f 64 65 2c 20 |ar (shor|t code, |
|000004a0| 73 68 6f 72 74 20 53 74 | 61 72 74 2c 20 73 68 6f |short St|art, sho|
|000004b0| 72 74 20 53 74 6f 70 2c | 0d 09 09 09 09 09 09 09 |rt Stop,|........|
|000004c0| 20 20 73 68 6f 72 74 20 | 49 6e 63 72 65 6d 65 6e | short |Incremen|
|000004d0| 74 2c 20 73 68 6f 72 74 | 20 4c 49 6e 63 72 65 6d |t, short| LIncrem|
|000004e0| 65 6e 74 2c 0d 09 09 09 | 09 09 09 09 20 20 43 6f |ent,....|.... Co|
|000004f0| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 20 74 68 65 43 |ntrolHan|dle theC|
|00000500| 6f 6e 74 72 6f 6c 2c 20 | 50 6f 69 6e 74 20 6d 79 |ontrol, |Point my|
|00000510| 50 74 29 3b 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |Pt);..st|atic voi|
|00000520| 64 20 44 6f 5f 41 5f 53 | 63 72 6f 6c 6c 42 61 72 |d Do_A_S|crollBar|
|00000530| 20 28 73 68 6f 72 74 20 | 63 6f 64 65 2c 20 43 6f | (short |code, Co|
|00000540| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 20 74 68 65 43 |ntrolHan|dle theC|
|00000550| 6f 6e 74 72 6f 6c 2c 20 | 50 6f 69 6e 74 20 6d 79 |ontrol, |Point my|
|00000560| 50 74 29 3b 0d 0d 0d 0d | 2f 2a 20 2a 2a 2a 2a 2a |Pt);....|/* *****|
|00000570| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000580| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 20 2a |********|****** *|
|00000590| 2f 0d 2f 2a 20 54 68 65 | 73 65 20 61 72 65 20 74 |/./* The|se are t|
|000005a0| 68 65 20 6f 74 68 65 72 | 20 69 6e 63 6c 75 64 65 |he other| include|
|000005b0| 73 20 66 6f 72 20 67 65 | 6e 65 72 61 6c 20 72 6f |s for ge|neral ro|
|000005c0| 75 74 69 6e 65 73 20 2a | 2f 0d 0d 23 69 6e 63 6c |utines *|/..#incl|
|000005d0| 75 64 65 20 3c 53 74 72 | 69 6e 67 73 2e 68 3e 0d |ude <Str|ings.h>.|
|000005e0| 65 78 74 65 72 6e 20 63 | 68 61 72 20 2a 73 74 72 |extern c|har *str|
|000005f0| 63 70 79 20 28 53 74 72 | 32 35 35 20 2a 2c 20 63 |cpy (Str|255 *, c|
|00000600| 68 61 72 20 2a 29 3b 09 | 2f 2a 20 4c 53 43 20 73 |har *);.|/* LSC s|
|00000610| 74 72 69 6e 67 20 70 72 | 6f 74 6f 74 79 70 65 20 |tring pr|ototype |
|00000620| 2a 2f 0d 0d 2f 2a 20 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*/../* *|********|
|00000630| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000640| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 20 2a 2f 0d 0d 23 |********|** */..#|
|00000650| 64 65 66 69 6e 65 20 20 | 20 20 20 20 54 52 55 45 |define | TRUE|
|00000660| 20 20 20 31 0d 23 64 65 | 66 69 6e 65 20 20 20 20 | 1.#de|fine |
|00000670| 20 20 46 41 4c 53 45 20 | 20 30 0d 23 64 65 66 69 | FALSE | 0.#defi|
|00000680| 6e 65 20 20 20 20 20 20 | 4e 49 4c 20 20 20 20 30 |ne |NIL 0|
|00000690| 0d 0d 2f 2a 20 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |../* ***|********|
|000006a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006b0| 2a 2a 2a 2a 2a 2a 2a 2a | 20 2a 2f 0d 0d 0d 0d 0d |********| */.....|
|000006c0| 2f 2a 20 53 63 72 6f 6c | 6c 62 61 72 20 49 44 20 |/* Scrol|lbar ID |
|000006d0| 2a 2f 0d 23 64 65 66 69 | 6e 65 09 49 5f 56 65 72 |*/.#defi|ne.I_Ver|
|000006e0| 74 5f 53 63 72 6f 6c 6c | 5f 62 61 72 20 09 32 35 |t_Scroll|_bar .25|
|000006f0| 0d 2f 2a 20 53 63 72 6f | 6c 6c 62 61 72 20 49 44 |./* Scro|llbar ID|
|00000700| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 09 49 5f 48 6f | */.#def|ine.I_Ho|
|00000710| 72 69 7a 5f 53 63 72 6f | 6c 6c 5f 62 61 72 20 09 |riz_Scro|ll_bar .|
|00000720| 32 34 0d 0d 73 74 61 74 | 69 63 20 43 6f 6e 74 72 |24..stat|ic Contr|
|00000730| 6f 6c 48 61 6e 64 6c 65 | 20 43 74 72 6c 48 61 6e |olHandle| CtrlHan|
|00000740| 64 6c 65 3b 09 2f 2a 20 | 43 6f 6e 74 72 6f 6c 20 |dle;./* |Control |
|00000750| 68 61 6e 64 6c 65 20 2a | 2f 0d 73 74 61 74 69 63 |handle *|/.static|
|00000760| 20 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 20 53 | Control|Handle S|
|00000770| 63 72 6f 6c 6c 48 48 61 | 6e 64 6c 65 2c 20 53 63 |crollHHa|ndle, Sc|
|00000780| 72 6f 6c 6c 56 48 61 6e | 64 6c 65 3b 09 2f 2a 20 |rollVHan|dle;./* |
|00000790| 53 63 72 6f 6c 6c 69 6e | 67 20 43 6f 6e 74 72 6f |Scrollin|g Contro|
|000007a0| 6c 2a 2f 0d 73 74 61 74 | 69 63 20 53 74 72 32 35 |l*/.stat|ic Str25|
|000007b0| 35 20 73 54 65 6d 70 3b | 09 09 2f 2a 20 47 65 74 |5 sTemp;|../* Get|
|000007c0| 20 74 65 78 74 20 65 6e | 74 65 72 65 64 2c 20 74 | text en|tered, t|
|000007d0| 65 6d 70 20 68 6f 6c 64 | 69 6e 67 20 2a 2f 0d 73 |emp hold|ing */.s|
|000007e0| 74 61 74 69 63 20 4f 53 | 45 72 72 20 4d 79 45 72 |tatic OS|Err MyEr|
|000007f0| 72 3b 09 09 09 2f 2a 20 | 47 65 6e 65 72 61 6c 20 |r;.../* |General |
|00000800| 4f 53 20 65 72 72 6f 72 | 20 72 65 74 75 72 6e 20 |OS error| return |
|00000810| 2a 2f 0d 73 74 61 74 69 | 63 20 43 6f 6e 74 72 6f |*/.stati|c Contro|
|00000820| 6c 48 61 6e 64 6c 65 20 | 43 5f 56 65 72 74 5f 53 |lHandle |C_Vert_S|
|00000830| 63 72 6f 6c 6c 5f 62 61 | 72 3b 09 2f 2a 20 53 63 |croll_ba|r;./* Sc|
|00000840| 72 6f 6c 6c 20 62 61 72 | 20 20 43 6f 6e 74 72 6f |roll bar| Contro|
|00000850| 6c 20 48 61 6e 64 6c 65 | 20 2a 2f 0d 73 74 61 74 |l Handle| */.stat|
|00000860| 69 63 20 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |ic Contr|olHandle|
|00000870| 20 43 5f 48 6f 72 69 7a | 5f 53 63 72 6f 6c 6c 5f | C_Horiz|_Scroll_|
|00000880| 62 61 72 3b 09 2f 2a 20 | 53 63 72 6f 6c 6c 20 62 |bar;./* |Scroll b|
|00000890| 61 72 20 20 43 6f 6e 74 | 72 6f 6c 20 48 61 6e 64 |ar Cont|rol Hand|
|000008a0| 6c 2a 2f 0d 0d 2f 2a 20 | 3d 3d 3d 3d 3d 3d 3d 3d |l*/../* |========|
|000008b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000008c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 20 2a |========|====== *|
|000008d0| 2f 0d 0d 2f 2a 20 49 6e | 69 74 69 61 6c 69 7a 65 |/../* In|itialize|
|000008e0| 20 75 73 20 73 6f 20 61 | 6c 6c 20 6f 75 72 20 72 | us so a|ll our r|
|000008f0| 6f 75 74 69 6e 65 73 20 | 63 61 6e 20 62 65 20 61 |outines |can be a|
|00000900| 63 74 69 76 61 74 65 64 | 20 2a 2f 0d 76 6f 69 64 |ctivated| */.void|
|00000910| 20 49 6e 69 74 5f 70 72 | 6f 74 6f 6e 20 28 29 0d | Init_pr|oton ().|
|00000920| 7b 0d 09 70 72 6f 74 6f | 6e 5f 57 69 6e 64 6f 77 |{..proto|n_Window|
|00000930| 20 3d 20 4e 49 4c 3b 09 | 09 09 2f 2a 20 4d 61 6b | = NIL;.|../* Mak|
|00000940| 65 20 73 75 72 65 20 6f | 74 68 65 72 20 72 6f 75 |e sure o|ther rou|
|00000950| 74 69 6e 65 73 20 6b 6e | 6f 77 20 77 65 20 61 72 |tines kn|ow we ar|
|00000960| 65 20 6e 6f 74 20 2a 2f | 0d 09 70 72 6f 74 6f 6e |e not */|..proton|
|00000970| 5f 72 65 63 74 2e 74 6f | 70 20 3d 20 30 3b 0d 09 |_rect.to|p = 0;..|
|00000980| 70 72 6f 74 6f 6e 5f 72 | 65 63 74 2e 62 6f 74 74 |proton_r|ect.bott|
|00000990| 6f 6d 20 3d 20 61 6c 6c | 5f 6d 79 5f 63 6f 6c 6f |om = all|_my_colo|
|000009a0| 72 73 3b 0d 09 70 72 6f | 74 6f 6e 5f 72 65 63 74 |rs;..pro|ton_rect|
|000009b0| 2e 6c 65 66 74 20 3d 20 | 30 3b 0d 09 70 72 6f 74 |.left = |0;..prot|
|000009c0| 6f 6e 5f 72 65 63 74 2e | 72 69 67 68 74 20 3d 20 |on_rect.|right = |
|000009d0| 33 30 30 3b 0d 7d 0d 0d | 2f 2a 20 3d 3d 3d 3d 3d |300;.}..|/* =====|
|000009e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000009f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 20 2a 2f 0d |========|==== */.|
|00000a00| 0d 76 6f 69 64 20 61 63 | 74 69 76 61 74 65 5f 70 |.void ac|tivate_p|
|00000a10| 72 6f 74 6f 6e 20 28 77 | 68 69 63 68 57 69 6e 64 |roton (w|hichWind|
|00000a20| 6f 77 2c 20 6d 6f 64 69 | 66 69 65 72 73 29 0d 09 |ow, modi|fiers)..|
|00000a30| 57 69 6e 64 6f 77 50 74 | 72 20 77 68 69 63 68 57 |WindowPt|r whichW|
|00000a40| 69 6e 64 6f 77 3b 0d 09 | 6c 6f 6e 67 20 6d 6f 64 |indow;..|long mod|
|00000a50| 69 66 69 65 72 73 3b 0d | 7b 0d 09 57 69 6e 64 6f |ifiers;.|{..Windo|
|00000a60| 77 50 74 72 20 53 61 76 | 65 50 6f 72 74 3b 0d 0d |wPtr Sav|ePort;..|
|00000a70| 09 47 65 74 50 6f 72 74 | 20 28 26 53 61 76 65 50 |.GetPort| (&SaveP|
|00000a80| 6f 72 74 29 3b 0d 09 69 | 66 20 28 20 6d 6f 64 69 |ort);..i|f ( modi|
|00000a90| 66 69 65 72 73 20 26 20 | 61 63 74 69 76 65 46 6c |fiers & |activeFl|
|00000aa0| 61 67 20 21 3d 20 30 20 | 29 0d 09 7b 0d 09 09 53 |ag != 0 |)..{...S|
|00000ab0| 65 6c 65 63 74 57 69 6e | 64 6f 77 28 77 68 69 63 |electWin|dow(whic|
|00000ac0| 68 57 69 6e 64 6f 77 29 | 3b 0d 09 09 53 65 74 50 |hWindow)|;...SetP|
|00000ad0| 6f 72 74 28 77 68 69 63 | 68 57 69 6e 64 6f 77 29 |ort(whic|hWindow)|
|00000ae0| 3b 0d 09 09 53 68 6f 77 | 43 6f 6e 74 72 6f 6c 20 |;...Show|Control |
|00000af0| 28 53 63 72 6f 6c 6c 48 | 48 61 6e 64 6c 65 29 3b |(ScrollH|Handle);|
|00000b00| 0d 09 09 53 68 6f 77 43 | 6f 6e 74 72 6f 6c 20 28 |...ShowC|ontrol (|
|00000b10| 53 63 72 6f 6c 6c 56 48 | 61 6e 64 6c 65 29 3b 0d |ScrollVH|andle);.|
|00000b20| 09 09 44 72 61 77 47 72 | 6f 77 49 63 6f 6e 28 20 |..DrawGr|owIcon( |
|00000b30| 77 68 69 63 68 57 69 6e | 64 6f 77 20 29 3b 0d 09 |whichWin|dow );..|
|00000b40| 09 44 72 61 77 43 6f 6e | 74 72 6f 6c 73 28 20 77 |.DrawCon|trols( w|
|00000b50| 68 69 63 68 57 69 6e 64 | 6f 77 20 29 3b 0d 09 7d |hichWind|ow );..}|
|00000b60| 0d 09 65 6c 73 65 0d 09 | 7b 0d 09 09 53 65 74 50 |..else..|{...SetP|
|00000b70| 6f 72 74 28 77 68 69 63 | 68 57 69 6e 64 6f 77 29 |ort(whic|hWindow)|
|00000b80| 3b 0d 09 09 48 69 64 65 | 43 6f 6e 74 72 6f 6c 20 |;...Hide|Control |
|00000b90| 28 53 63 72 6f 6c 6c 48 | 48 61 6e 64 6c 65 29 3b |(ScrollH|Handle);|
|00000ba0| 0d 09 09 48 69 64 65 43 | 6f 6e 74 72 6f 6c 20 28 |...HideC|ontrol (|
|00000bb0| 53 63 72 6f 6c 6c 56 48 | 61 6e 64 6c 65 29 3b 0d |ScrollVH|andle);.|
|00000bc0| 09 09 44 72 61 77 47 72 | 6f 77 49 63 6f 6e 28 20 |..DrawGr|owIcon( |
|00000bd0| 77 68 69 63 68 57 69 6e | 64 6f 77 20 29 3b 0d 09 |whichWin|dow );..|
|00000be0| 09 44 72 61 77 43 6f 6e | 74 72 6f 6c 73 28 20 77 |.DrawCon|trols( w|
|00000bf0| 68 69 63 68 57 69 6e 64 | 6f 77 20 29 3b 0d 09 7d |hichWind|ow );..}|
|00000c00| 0d 09 53 65 74 50 6f 72 | 74 28 53 61 76 65 50 6f |..SetPor|t(SavePo|
|00000c10| 72 74 29 3b 0d 7d 0d 0d | 74 79 70 65 64 65 66 20 |rt);.}..|typedef |
|00000c20| 57 53 74 61 74 65 44 61 | 74 61 20 2a 2a 57 53 74 |WStateDa|ta **WSt|
|00000c30| 61 74 65 48 61 6e 64 6c | 65 3b 0d 0d 76 6f 69 64 |ateHandl|e;..void|
|00000c40| 20 7a 6f 6f 6d 5f 70 72 | 6f 74 6f 6e 28 20 77 68 | zoom_pr|oton( wh|
|00000c50| 65 72 65 2c 20 77 68 69 | 63 68 57 69 6e 64 6f 77 |ere, whi|chWindow|
|00000c60| 2c 20 63 6f 64 65 20 29 | 0d 09 50 6f 69 6e 74 20 |, code )|..Point |
|00000c70| 2a 77 68 65 72 65 3b 0d | 09 57 69 6e 64 6f 77 50 |*where;.|.WindowP|
|00000c80| 65 65 6b 20 77 68 69 63 | 68 57 69 6e 64 6f 77 3b |eek whic|hWindow;|
|00000c90| 0d 09 73 68 6f 72 74 20 | 63 6f 64 65 3b 0d 7b 0d |..short |code;.{.|
|00000ca0| 09 50 6f 69 6e 74 20 6d | 79 50 74 3b 0d 09 57 53 |.Point m|yPt;..WS|
|00000cb0| 74 61 74 65 48 61 6e 64 | 6c 65 20 57 53 74 61 74 |tateHand|le WStat|
|00000cc0| 65 3b 0d 09 0d 09 53 65 | 74 50 6f 72 74 20 28 77 |e;....Se|tPort (w|
|00000cd0| 68 69 63 68 57 69 6e 64 | 6f 77 29 3b 0d 0d 09 69 |hichWind|ow);...i|
|00000ce0| 66 20 28 20 77 68 69 63 | 68 57 69 6e 64 6f 77 2d |f ( whic|hWindow-|
|00000cf0| 3e 64 61 74 61 48 61 6e | 64 6c 65 20 21 3d 20 4e |>dataHan|dle != N|
|00000d00| 49 4c 20 29 0d 09 7b 0d | 09 09 57 53 74 61 74 65 |IL )..{.|..WState|
|00000d10| 20 3d 20 28 57 53 74 61 | 74 65 48 61 6e 64 6c 65 | = (WSta|teHandle|
|00000d20| 29 20 77 68 69 63 68 57 | 69 6e 64 6f 77 2d 3e 64 |) whichW|indow->d|
|00000d30| 61 74 61 48 61 6e 64 6c | 65 3b 0d 09 09 28 2a 2a |ataHandl|e;...(**|
|00000d40| 57 53 74 61 74 65 29 2e | 73 74 64 53 74 61 74 65 |WState).|stdState|
|00000d50| 20 3d 20 70 72 6f 74 6f | 6e 5f 72 65 63 74 3b 0d | = proto|n_rect;.|
|00000d60| 09 09 28 2a 2a 57 53 74 | 61 74 65 29 2e 73 74 64 |..(**WSt|ate).std|
|00000d70| 53 74 61 74 65 2e 74 6f | 70 20 2b 3d 20 34 30 3b |State.to|p += 40;|
|00000d80| 0d 09 09 28 2a 2a 57 53 | 74 61 74 65 29 2e 73 74 |...(**WS|tate).st|
|00000d90| 64 53 74 61 74 65 2e 6c | 65 66 74 20 2b 3d 20 32 |dState.l|eft += 2|
|00000da0| 3b 0d 09 09 28 2a 2a 57 | 53 74 61 74 65 29 2e 73 |;...(**W|State).s|
|00000db0| 74 64 53 74 61 74 65 2e | 72 69 67 68 74 20 2b 3d |tdState.|right +=|
|00000dc0| 20 32 3b 0d 09 09 28 2a | 2a 57 53 74 61 74 65 29 | 2;...(*|*WState)|
|00000dd0| 2e 73 74 64 53 74 61 74 | 65 2e 62 6f 74 74 6f 6d |.stdStat|e.bottom|
|00000de0| 20 2b 3d 20 34 30 3b 0d | 09 7d 0d 09 6d 79 50 74 | += 40;.|.}..myPt|
|00000df0| 20 3d 20 2a 77 68 65 72 | 65 3b 09 2f 2a 20 47 65 | = *wher|e;./* Ge|
|00000e00| 74 20 6d 6f 75 73 65 20 | 70 6f 73 69 74 69 6f 6e |t mouse |position|
|00000e10| 20 2a 2f 0d 09 47 6c 6f | 62 61 6c 54 6f 4c 6f 63 | */..Glo|balToLoc|
|00000e20| 61 6c 20 28 26 6d 79 50 | 74 29 3b 09 2f 2a 20 4d |al (&myP|t);./* M|
|00000e30| 61 6b 65 20 69 74 20 72 | 65 6c 61 74 69 76 65 20 |ake it r|elative |
|00000e40| 2a 2f 0d 0d 09 69 66 20 | 28 54 72 61 63 6b 42 6f |*/...if |(TrackBo|
|00000e50| 78 20 28 77 68 69 63 68 | 57 69 6e 64 6f 77 2c 20 |x (which|Window, |
|00000e60| 6d 79 50 74 2c 20 63 6f | 64 65 29 20 3d 3d 20 54 |myPt, co|de) == T|
|00000e70| 52 55 45 29 0d 09 7b 0d | 09 09 45 72 61 73 65 52 |RUE)..{.|..EraseR|
|00000e80| 65 63 74 28 20 26 77 68 | 69 63 68 57 69 6e 64 6f |ect( &wh|ichWindo|
|00000e90| 77 2d 3e 70 6f 72 74 2e | 70 6f 72 74 52 65 63 74 |w->port.|portRect|
|00000ea0| 20 29 3b 0d 09 09 5a 6f | 6f 6d 57 69 6e 64 6f 77 | );...Zo|omWindow|
|00000eb0| 20 28 77 68 69 63 68 57 | 69 6e 64 6f 77 2c 20 63 | (whichW|indow, c|
|00000ec0| 6f 64 65 2c 20 54 52 55 | 45 29 3b 0d 09 09 49 6e |ode, TRU|E);...In|
|00000ed0| 76 61 6c 52 65 63 74 20 | 28 26 77 68 69 63 68 57 |valRect |(&whichW|
|00000ee0| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 2e 70 6f 72 74 |indow->p|ort.port|
|00000ef0| 52 65 63 74 29 3b 09 0d | 09 7d 0d 09 52 65 73 69 |Rect);..|.}..Resi|
|00000f00| 7a 65 64 5f 70 72 6f 74 | 6f 6e 20 28 70 72 6f 74 |zed_prot|on (prot|
|00000f10| 6f 6e 5f 57 69 6e 64 6f | 77 29 3b 0d 7d 0d 0d 76 |on_Windo|w);.}..v|
|00000f20| 6f 69 64 20 67 72 6f 77 | 5f 70 72 6f 74 6f 6e 28 |oid grow|_proton(|
|00000f30| 20 77 68 65 72 65 2c 20 | 77 68 69 63 68 57 69 6e | where, |whichWin|
|00000f40| 64 6f 77 20 29 0d 09 50 | 6f 69 6e 74 20 2a 77 68 |dow )..P|oint *wh|
|00000f50| 65 72 65 3b 0d 09 57 69 | 6e 64 6f 77 50 74 72 20 |ere;..Wi|ndowPtr |
|00000f60| 77 68 69 63 68 57 69 6e | 64 6f 77 3b 0d 7b 0d 09 |whichWin|dow;.{..|
|00000f70| 50 6f 69 6e 74 20 6d 79 | 50 74 3b 0d 09 6c 6f 6e |Point my|Pt;..lon|
|00000f80| 67 20 6d 52 65 73 75 6c | 74 3b 0d 0d 09 53 65 74 |g mResul|t;...Set|
|00000f90| 50 6f 72 74 20 28 77 68 | 69 63 68 57 69 6e 64 6f |Port (wh|ichWindo|
|00000fa0| 77 29 3b 0d 0d 09 6d 79 | 50 74 20 3d 20 2a 77 68 |w);...my|Pt = *wh|
|00000fb0| 65 72 65 3b 09 2f 2a 20 | 47 65 74 20 6d 6f 75 73 |ere;./* |Get mous|
|00000fc0| 65 20 70 6f 73 69 74 69 | 6f 6e 20 2a 2f 0d 09 47 |e positi|on */..G|
|00000fd0| 6c 6f 62 61 6c 54 6f 4c | 6f 63 61 6c 20 28 26 6d |lobalToL|ocal (&m|
|00000fe0| 79 50 74 29 3b 09 2f 2a | 20 4d 61 6b 65 20 69 74 |yPt);./*| Make it|
|00000ff0| 20 72 65 6c 61 74 69 76 | 65 20 2a 2f 0d 0d 09 6d | relativ|e */...m|
|00001000| 52 65 73 75 6c 74 20 3d | 20 47 72 6f 77 57 69 6e |Result =| GrowWin|
|00001010| 64 6f 77 20 28 77 68 69 | 63 68 57 69 6e 64 6f 77 |dow (whi|chWindow|
|00001020| 2c 20 2a 77 68 65 72 65 | 2c 20 26 70 72 6f 74 6f |, *where|, &proto|
|00001030| 6e 5f 72 65 63 74 29 3b | 0d 0d 09 53 69 7a 65 57 |n_rect);|...SizeW|
|00001040| 69 6e 64 6f 77 20 28 77 | 68 69 63 68 57 69 6e 64 |indow (w|hichWind|
|00001050| 6f 77 2c 20 4c 6f 57 6f | 72 64 20 28 6d 52 65 73 |ow, LoWo|rd (mRes|
|00001060| 75 6c 74 29 2c 0d 09 09 | 09 09 48 69 57 6f 72 64 |ult),...|..HiWord|
|00001070| 20 28 6d 52 65 73 75 6c | 74 29 2c 20 54 52 55 45 | (mResul|t), TRUE|
|00001080| 29 3b 0d 09 52 65 73 69 | 7a 65 64 5f 70 72 6f 74 |);..Resi|zed_prot|
|00001090| 6f 6e 20 28 70 72 6f 74 | 6f 6e 5f 57 69 6e 64 6f |on (prot|on_Windo|
|000010a0| 77 29 3b 0d 7d 0d 0d 2f | 2a 20 57 65 20 77 65 72 |w);.}../|* We wer|
|000010b0| 65 20 72 65 73 69 7a 65 | 64 20 6f 72 20 7a 6f 6f |e resize|d or zoo|
|000010c0| 6d 65 64 2c 20 75 70 64 | 61 74 65 20 74 68 65 20 |med, upd|ate the |
|000010d0| 73 63 72 6f 6c 6c 69 6e | 67 20 73 63 72 6f 6c 6c |scrollin|g scroll|
|000010e0| 62 61 72 73 20 2a 2f 0d | 76 6f 69 64 20 52 65 73 |bars */.|void Res|
|000010f0| 69 7a 65 64 5f 70 72 6f | 74 6f 6e 20 28 77 68 69 |ized_pro|ton (whi|
|00001100| 63 68 57 69 6e 64 6f 77 | 29 2f 2a 20 52 65 73 69 |chWindow|)/* Resi|
|00001110| 7a 65 64 20 74 68 69 73 | 20 77 69 6e 64 6f 77 20 |zed this| window |
|00001120| 2a 2f 0d 09 57 69 6e 64 | 6f 77 50 74 72 20 77 68 |*/..Wind|owPtr wh|
|00001130| 69 63 68 57 69 6e 64 6f | 77 3b 09 09 2f 2a 20 57 |ichWindo|w;../* W|
|00001140| 69 6e 64 6f 77 20 74 68 | 61 74 20 77 61 73 20 72 |indow th|at was r|
|00001150| 65 73 69 7a 65 64 20 2a | 2f 0d 7b 0d 09 57 69 6e |esized *|/.{..Win|
|00001160| 64 6f 77 50 74 72 20 53 | 61 76 65 50 6f 72 74 3b |dowPtr S|avePort;|
|00001170| 09 09 2f 2a 20 50 6c 61 | 63 65 20 74 6f 20 73 61 |../* Pla|ce to sa|
|00001180| 76 65 20 74 68 65 20 6c | 61 73 74 20 70 6f 72 74 |ve the l|ast port|
|00001190| 20 2a 2f 0d 0d 09 47 65 | 74 50 6f 72 74 20 28 26 | */...Ge|tPort (&|
|000011a0| 53 61 76 65 50 6f 72 74 | 29 3b 0d 09 53 65 74 50 |SavePort|);..SetP|
|000011b0| 6f 72 74 20 28 70 72 6f | 74 6f 6e 5f 57 69 6e 64 |ort (pro|ton_Wind|
|000011c0| 6f 77 29 3b 0d 0d 09 69 | 66 20 28 53 63 72 6f 6c |ow);...i|f (Scrol|
|000011d0| 6c 48 48 61 6e 64 6c 65 | 20 21 3d 20 4e 49 4c 29 |lHHandle| != NIL)|
|000011e0| 0d 09 7b 0d 09 09 48 4c | 6f 63 6b 20 28 28 48 61 |..{...HL|ock ((Ha|
|000011f0| 6e 64 6c 65 29 53 63 72 | 6f 6c 6c 48 48 61 6e 64 |ndle)Scr|ollHHand|
|00001200| 6c 65 29 3b 0d 09 09 48 | 69 64 65 43 6f 6e 74 72 |le);...H|ideContr|
|00001210| 6f 6c 20 28 53 63 72 6f | 6c 6c 48 48 61 6e 64 6c |ol (Scro|llHHandl|
|00001220| 65 29 3b 0d 0d 09 09 49 | 6e 76 61 6c 52 65 63 74 |e);....I|nvalRect|
|00001230| 20 28 26 28 2a 53 63 72 | 6f 6c 6c 48 48 61 6e 64 | (&(*Scr|ollHHand|
|00001240| 6c 65 29 2d 3e 63 6f 6e | 74 72 6c 52 65 63 74 29 |le)->con|trlRect)|
|00001250| 3b 09 2f 2a 20 46 6c 61 | 67 20 6f 6c 64 20 70 6f |;./* Fla|g old po|
|00001260| 73 69 74 69 6f 6e 20 66 | 6f 72 20 75 70 64 61 74 |sition f|or updat|
|00001270| 65 20 72 6f 75 74 2a 2f | 0d 0d 09 09 4d 6f 76 65 |e rout*/|....Move|
|00001280| 43 6f 6e 74 72 6f 6c 20 | 28 53 63 72 6f 6c 6c 48 |Control |(ScrollH|
|00001290| 48 61 6e 64 6c 65 2c 20 | 70 72 6f 74 6f 6e 5f 57 |Handle, |proton_W|
|000012a0| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 2e |indow->p|ortRect.|
|000012b0| 6c 65 66 74 2d 31 2c 0d | 09 09 09 70 72 6f 74 6f |left-1,.|...proto|
|000012c0| 6e 5f 57 69 6e 64 6f 77 | 2d 3e 70 6f 72 74 52 65 |n_Window|->portRe|
|000012d0| 63 74 2e 62 6f 74 74 6f | 6d 20 2d 20 31 35 29 3b |ct.botto|m - 15);|
|000012e0| 0d 09 09 53 69 7a 65 43 | 6f 6e 74 72 6f 6c 20 28 |...SizeC|ontrol (|
|000012f0| 53 63 72 6f 6c 6c 48 48 | 61 6e 64 6c 65 2c 20 28 |ScrollHH|andle, (|
|00001300| 70 72 6f 74 6f 6e 5f 57 | 69 6e 64 6f 77 2d 3e 70 |proton_W|indow->p|
|00001310| 6f 72 74 52 65 63 74 2e | 72 69 67 68 74 20 0d 09 |ortRect.|right ..|
|00001320| 09 09 2d 20 70 72 6f 74 | 6f 6e 5f 57 69 6e 64 6f |..- prot|on_Windo|
|00001330| 77 2d 3e 70 6f 72 74 52 | 65 63 74 2e 6c 65 66 74 |w->portR|ect.left|
|00001340| 29 20 2d 20 31 33 2c 20 | 31 36 29 3b 0d 0d 09 09 |) - 13, |16);....|
|00001350| 53 68 6f 77 43 6f 6e 74 | 72 6f 6c 20 28 53 63 72 |ShowCont|rol (Scr|
|00001360| 6f 6c 6c 48 48 61 6e 64 | 6c 65 29 3b 0d 09 09 48 |ollHHand|le);...H|
|00001370| 55 6e 6c 6f 63 6b 20 28 | 28 48 61 6e 64 6c 65 29 |Unlock (|(Handle)|
|00001380| 53 63 72 6f 6c 6c 48 48 | 61 6e 64 6c 65 29 3b 0d |ScrollHH|andle);.|
|00001390| 09 7d 0d 09 69 66 20 28 | 53 63 72 6f 6c 6c 56 48 |.}..if (|ScrollVH|
|000013a0| 61 6e 64 6c 65 20 21 3d | 20 4e 49 4c 29 0d 09 7b |andle !=| NIL)..{|
|000013b0| 0d 09 09 48 4c 6f 63 6b | 20 28 28 48 61 6e 64 6c |...HLock| ((Handl|
|000013c0| 65 29 53 63 72 6f 6c 6c | 56 48 61 6e 64 6c 65 29 |e)Scroll|VHandle)|
|000013d0| 3b 0d 09 09 48 69 64 65 | 43 6f 6e 74 72 6f 6c 20 |;...Hide|Control |
|000013e0| 28 53 63 72 6f 6c 6c 56 | 48 61 6e 64 6c 65 29 3b |(ScrollV|Handle);|
|000013f0| 0d 0d 09 09 49 6e 76 61 | 6c 52 65 63 74 20 28 26 |....Inva|lRect (&|
|00001400| 28 2a 53 63 72 6f 6c 6c | 56 48 61 6e 64 6c 65 29 |(*Scroll|VHandle)|
|00001410| 2d 3e 63 6f 6e 74 72 6c | 52 65 63 74 29 3b 09 2f |->contrl|Rect);./|
|00001420| 2a 20 46 6c 61 67 20 6f | 6c 64 20 70 6f 73 69 74 |* Flag o|ld posit|
|00001430| 69 6f 6e 20 66 6f 72 20 | 75 70 64 61 74 65 20 72 |ion for |update r|
|00001440| 6f 75 74 2a 2f 0d 0d 09 | 09 4d 6f 76 65 43 6f 6e |out*/...|.MoveCon|
|00001450| 74 72 6f 6c 20 28 53 63 | 72 6f 6c 6c 56 48 61 6e |trol (Sc|rollVHan|
|00001460| 64 6c 65 2c 20 70 72 6f | 74 6f 6e 5f 57 69 6e 64 |dle, pro|ton_Wind|
|00001470| 6f 77 2d 3e 70 6f 72 74 | 52 65 63 74 2e 72 69 67 |ow->port|Rect.rig|
|00001480| 68 74 2d 31 35 2c 0d 09 | 09 09 70 72 6f 74 6f 6e |ht-15,..|..proton|
|00001490| 5f 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |_Window-|>portRec|
|000014a0| 74 2e 74 6f 70 2d 31 29 | 3b 0d 09 09 53 69 7a 65 |t.top-1)|;...Size|
|000014b0| 43 6f 6e 74 72 6f 6c 20 | 28 53 63 72 6f 6c 6c 56 |Control |(ScrollV|
|000014c0| 48 61 6e 64 6c 65 2c 20 | 31 36 2c 20 28 70 72 6f |Handle, |16, (pro|
|000014d0| 74 6f 6e 5f 57 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 |ton_Wind|ow->port|
|000014e0| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 0d 09 09 09 |Rect.bot|tom ....|
|000014f0| 2d 20 70 72 6f 74 6f 6e | 5f 57 69 6e 64 6f 77 2d |- proton|_Window-|
|00001500| 3e 70 6f 72 74 52 65 63 | 74 2e 74 6f 70 29 20 2d |>portRec|t.top) -|
|00001510| 20 31 33 29 3b 0d 0d 09 | 09 53 68 6f 77 43 6f 6e | 13);...|.ShowCon|
|00001520| 74 72 6f 6c 20 28 53 63 | 72 6f 6c 6c 56 48 61 6e |trol (Sc|rollVHan|
|00001530| 64 6c 65 29 3b 0d 09 09 | 48 55 6e 6c 6f 63 6b 20 |dle);...|HUnlock |
|00001540| 28 28 48 61 6e 64 6c 65 | 29 53 63 72 6f 6c 6c 56 |((Handle|)ScrollV|
|00001550| 48 61 6e 64 6c 65 29 3b | 0d 09 7d 0d 09 49 6e 76 |Handle);|..}..Inv|
|00001560| 61 6c 52 65 63 74 28 26 | 70 72 6f 74 6f 6e 5f 57 |alRect(&|proton_W|
|00001570| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 29 |indow->p|ortRect)|
|00001580| 3b 0d 09 44 72 61 77 47 | 72 6f 77 49 63 6f 6e 20 |;..DrawG|rowIcon |
|00001590| 28 70 72 6f 74 6f 6e 5f | 57 69 6e 64 6f 77 29 3b |(proton_|Window);|
|000015a0| 09 0d 09 53 65 74 50 6f | 72 74 20 28 53 61 76 65 |...SetPo|rt (Save|
|000015b0| 50 6f 72 74 29 3b 0d 7d | 0d 2f 2a 20 45 6e 64 20 |Port);.}|./* End |
|000015c0| 6f 66 20 66 75 6e 63 74 | 69 6f 6e 20 2a 2f 0d 0d |of funct|ion */..|
|000015d0| 2f 2a 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |/* =====|========|
|000015e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000015f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 20 2a 2f 0d 0d 2f 2a |========|= */../*|
|00001600| 20 55 70 64 61 74 65 20 | 6f 75 72 20 77 69 6e 64 | Update |our wind|
|00001610| 6f 77 2c 20 73 6f 6d 65 | 6f 6e 65 20 75 6e 63 6f |ow, some|one unco|
|00001620| 76 65 72 65 64 20 61 20 | 70 61 72 74 20 6f 66 20 |vered a |part of |
|00001630| 75 73 20 2a 2f 0d 76 6f | 69 64 20 55 70 44 61 74 |us */.vo|id UpDat|
|00001640| 65 5f 70 72 6f 74 6f 6e | 20 28 77 68 69 63 68 57 |e_proton| (whichW|
|00001650| 69 6e 64 6f 77 29 0d 57 | 69 6e 64 6f 77 50 74 72 |indow).W|indowPtr|
|00001660| 20 77 68 69 63 68 57 69 | 6e 64 6f 77 3b 0d 7b 0d | whichWi|ndow;.{.|
|00001670| 09 57 69 6e 64 6f 77 50 | 74 72 20 53 61 76 65 50 |.WindowP|tr SaveP|
|00001680| 6f 72 74 3b 09 09 2f 2a | 20 50 6c 61 63 65 20 74 |ort;../*| Place t|
|00001690| 6f 20 73 61 76 65 20 74 | 68 65 20 6c 61 73 74 20 |o save t|he last |
|000016a0| 70 6f 72 74 20 2a 2f 0d | 0d 09 47 65 74 50 6f 72 |port */.|..GetPor|
|000016b0| 74 20 28 26 53 61 76 65 | 50 6f 72 74 29 3b 09 2f |t (&Save|Port);./|
|000016c0| 2a 20 53 61 76 65 20 74 | 68 65 20 63 75 72 72 65 |* Save t|he curre|
|000016d0| 6e 74 20 70 6f 72 74 20 | 2a 2f 0d 09 53 65 74 50 |nt port |*/..SetP|
|000016e0| 6f 72 74 20 28 70 72 6f | 74 6f 6e 5f 57 69 6e 64 |ort (pro|ton_Wind|
|000016f0| 6f 77 29 3b 09 2f 2a 20 | 53 65 74 20 74 68 65 20 |ow);./* |Set the |
|00001700| 70 6f 72 74 20 74 6f 20 | 6d 79 20 77 69 6e 64 6f |port to |my windo|
|00001710| 77 20 2a 2f 0d 0d 09 49 | 6e 76 61 6c 52 65 63 74 |w */...I|nvalRect|
|00001720| 28 26 70 72 6f 74 6f 6e | 5f 57 69 6e 64 6f 77 2d |(&proton|_Window-|
|00001730| 3e 70 6f 72 74 52 65 63 | 74 29 3b 0d 0d 09 42 65 |>portRec|t);...Be|
|00001740| 67 69 6e 55 70 64 61 74 | 65 28 20 70 72 6f 74 6f |ginUpdat|e( proto|
|00001750| 6e 5f 57 69 6e 64 6f 77 | 20 29 3b 0d 09 64 72 61 |n_Window| );..dra|
|00001760| 77 5f 70 72 6f 74 6f 6e | 28 29 3b 0d 09 44 72 61 |w_proton|();..Dra|
|00001770| 77 43 6f 6e 74 72 6f 6c | 73 20 28 70 72 6f 74 6f |wControl|s (proto|
|00001780| 6e 5f 57 69 6e 64 6f 77 | 29 3b 09 2f 2a 20 44 72 |n_Window|);./* Dr|
|00001790| 61 77 20 61 6c 6c 20 74 | 68 65 20 63 6f 6e 74 72 |aw all t|he contr|
|000017a0| 6f 6c 73 20 2a 2f 0d 09 | 44 72 61 77 47 72 6f 77 |ols */..|DrawGrow|
|000017b0| 49 63 6f 6e 20 28 70 72 | 6f 74 6f 6e 5f 57 69 6e |Icon (pr|oton_Win|
|000017c0| 64 6f 77 29 3b 09 2f 2a | 20 44 72 61 77 20 74 68 |dow);./*| Draw th|
|000017d0| 65 20 47 72 6f 77 20 62 | 6f 78 20 2a 2f 0d 09 45 |e Grow b|ox */..E|
|000017e0| 6e 64 55 70 64 61 74 65 | 28 70 72 6f 74 6f 6e 5f |ndUpdate|(proton_|
|000017f0| 57 69 6e 64 6f 77 29 3b | 0d 09 53 65 74 50 6f 72 |Window);|..SetPor|
|00001800| 74 20 28 53 61 76 65 50 | 6f 72 74 29 3b 09 2f 2a |t (SaveP|ort);./*|
|00001810| 20 52 65 73 74 6f 72 65 | 20 74 68 65 20 6f 6c 64 | Restore| the old|
|00001820| 20 70 6f 72 74 20 2a 2f | 0d 7d 0d 0d 73 74 61 74 | port */|.}..stat|
|00001830| 69 63 20 76 6f 69 64 20 | 64 72 61 77 5f 70 72 6f |ic void |draw_pro|
|00001840| 74 6f 6e 28 29 0d 7b 0d | 09 52 65 63 74 20 63 6c |ton().{.|.Rect cl|
|00001850| 69 70 70 65 72 3b 0d 09 | 52 65 63 74 20 6f 66 66 |ipper;..|Rect off|
|00001860| 72 65 63 74 3b 20 2f 2a | 20 63 6f 6f 72 64 73 20 |rect; /*| coords |
|00001870| 69 6e 20 6f 66 66 73 63 | 72 65 65 6e 20 62 69 74 |in offsc|reen bit|
|00001880| 6d 61 70 20 2a 2f 0d 09 | 73 68 6f 72 74 20 69 3b |map */..|short i;|
|00001890| 0d 0d 09 63 6c 69 70 70 | 65 72 2e 74 6f 70 20 3d |...clipp|er.top =|
|000018a0| 20 70 72 6f 74 6f 6e 5f | 57 69 6e 64 6f 77 2d 3e | proton_|Window->|
|000018b0| 70 6f 72 74 52 65 63 74 | 2e 74 6f 70 3b 0d 09 63 |portRect|.top;..c|
|000018c0| 6c 69 70 70 65 72 2e 62 | 6f 74 74 6f 6d 20 3d 20 |lipper.b|ottom = |
|000018d0| 70 72 6f 74 6f 6e 5f 57 | 69 6e 64 6f 77 2d 3e 70 |proton_W|indow->p|
|000018e0| 6f 72 74 52 65 63 74 2e | 62 6f 74 74 6f 6d 20 2d |ortRect.|bottom -|
|000018f0| 20 31 35 3b 0d 09 63 6c | 69 70 70 65 72 2e 72 69 | 15;..cl|ipper.ri|
|00001900| 67 68 74 20 3d 20 70 72 | 6f 74 6f 6e 5f 57 69 6e |ght = pr|oton_Win|
|00001910| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2e 72 69 |dow->por|tRect.ri|
|00001920| 67 68 74 20 2d 20 31 35 | 3b 0d 09 63 6c 69 70 70 |ght - 15|;..clipp|
|00001930| 65 72 2e 6c 65 66 74 20 | 3d 20 70 72 6f 74 6f 6e |er.left |= proton|
|00001940| 5f 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |_Window-|>portRec|
|00001950| 74 2e 6c 65 66 74 3b 0d | 09 0d 09 43 6c 69 70 52 |t.left;.|...ClipR|
|00001960| 65 63 74 28 20 26 63 6c | 69 70 70 65 72 20 29 3b |ect( &cl|ipper );|
|00001970| 0d 09 0d 09 45 72 61 73 | 65 52 65 63 74 28 20 26 |....Eras|eRect( &|
|00001980| 63 6c 69 70 70 65 72 20 | 29 3b 0d 09 69 66 20 28 |clipper |);..if (|
|00001990| 20 73 31 5f 6f 66 66 5f | 74 6f 70 20 3c 20 70 72 | s1_off_|top < pr|
|000019a0| 6f 74 6f 6e 5f 72 65 63 | 74 2e 62 6f 74 74 6f 6d |oton_rec|t.bottom|
|000019b0| 20 20 26 26 20 0d 09 09 | 09 73 31 5f 6f 66 66 5f | && ...|.s1_off_|
|000019c0| 6c 65 66 74 20 3c 20 70 | 72 6f 74 6f 6e 5f 72 65 |left < p|roton_re|
|000019d0| 63 74 2e 72 69 67 68 74 | 20 29 0d 09 7b 0d 09 09 |ct.right| )..{...|
|000019e0| 69 66 20 28 20 70 72 6f | 74 6f 6e 5f 62 6d 61 70 |if ( pro|ton_bmap|
|000019f0| 20 21 3d 20 4e 49 4c 20 | 29 0d 09 09 7b 0d 09 09 | != NIL |)...{...|
|00001a00| 09 6f 66 66 72 65 63 74 | 20 3d 20 63 6c 69 70 70 |.offrect| = clipp|
|00001a10| 65 72 3b 0d 09 09 09 6f | 66 66 72 65 63 74 2e 74 |er;....o|ffrect.t|
|00001a20| 6f 70 20 2b 3d 20 73 31 | 5f 6f 66 66 5f 74 6f 70 |op += s1|_off_top|
|00001a30| 3b 0d 09 09 09 6f 66 66 | 72 65 63 74 2e 62 6f 74 |;....off|rect.bot|
|00001a40| 74 6f 6d 20 2b 3d 20 73 | 31 5f 6f 66 66 5f 74 6f |tom += s|1_off_to|
|00001a50| 70 3b 0d 09 09 09 69 66 | 20 28 20 6f 66 66 72 65 |p;....if| ( offre|
|00001a60| 63 74 2e 62 6f 74 74 6f | 6d 20 3e 20 70 72 6f 74 |ct.botto|m > prot|
|00001a70| 6f 6e 5f 72 65 63 74 2e | 62 6f 74 74 6f 6d 20 2b |on_rect.|bottom +|
|00001a80| 20 73 31 5f 6f 66 66 5f | 74 6f 70 20 29 0d 09 09 | s1_off_|top )...|
|00001a90| 09 7b 0d 09 09 09 09 6f | 66 66 72 65 63 74 2e 62 |.{.....o|ffrect.b|
|00001aa0| 6f 74 74 6f 6d 20 3d 20 | 70 72 6f 74 6f 6e 5f 72 |ottom = |proton_r|
|00001ab0| 65 63 74 2e 62 6f 74 74 | 6f 6d 3b 0d 09 09 09 09 |ect.bott|om;.....|
|00001ac0| 63 6c 69 70 70 65 72 2e | 62 6f 74 74 6f 6d 20 3d |clipper.|bottom =|
|00001ad0| 20 70 72 6f 74 6f 6e 5f | 72 65 63 74 2e 62 6f 74 | proton_|rect.bot|
|00001ae0| 74 6f 6d 20 2d 20 73 31 | 5f 6f 66 66 5f 74 6f 70 |tom - s1|_off_top|
|00001af0| 3b 0d 09 09 09 7d 0d 09 | 09 09 6f 66 66 72 65 63 |;....}..|..offrec|
|00001b00| 74 2e 6c 65 66 74 20 2b | 3d 20 73 31 5f 6f 66 66 |t.left +|= s1_off|
|00001b10| 5f 6c 65 66 74 3b 0d 09 | 09 09 6f 66 66 72 65 63 |_left;..|..offrec|
|00001b20| 74 2e 72 69 67 68 74 20 | 2b 3d 20 73 31 5f 6f 66 |t.right |+= s1_of|
|00001b30| 66 5f 6c 65 66 74 3b 0d | 09 09 09 69 66 20 28 20 |f_left;.|...if ( |
|00001b40| 6f 66 66 72 65 63 74 2e | 72 69 67 68 74 20 3e 20 |offrect.|right > |
|00001b50| 70 72 6f 74 6f 6e 5f 72 | 65 63 74 2e 72 69 67 68 |proton_r|ect.righ|
|00001b60| 74 20 2b 20 73 31 5f 6f | 66 66 5f 6c 65 66 74 20 |t + s1_o|ff_left |
|00001b70| 29 0d 09 09 09 7b 0d 09 | 09 09 09 6f 66 66 72 65 |)....{..|...offre|
|00001b80| 63 74 2e 72 69 67 68 74 | 20 3d 20 70 72 6f 74 6f |ct.right| = proto|
|00001b90| 6e 5f 72 65 63 74 2e 72 | 69 67 68 74 3b 0d 09 09 |n_rect.r|ight;...|
|00001ba0| 09 09 63 6c 69 70 70 65 | 72 2e 72 69 67 68 74 20 |..clippe|r.right |
|00001bb0| 3d 20 70 72 6f 74 6f 6e | 5f 72 65 63 74 2e 72 69 |= proton|_rect.ri|
|00001bc0| 67 68 74 20 2d 20 73 31 | 5f 6f 66 66 5f 6c 65 66 |ght - s1|_off_lef|
|00001bd0| 74 3b 0d 09 09 09 7d 0d | 0d 09 09 09 48 4c 6f 63 |t;....}.|....HLoc|
|00001be0| 6b 28 28 48 61 6e 64 6c | 65 29 20 28 70 72 6f 74 |k((Handl|e) (prot|
|00001bf0| 6f 6e 5f 62 6d 61 70 2d | 3e 70 6f 72 74 50 69 78 |on_bmap-|>portPix|
|00001c00| 4d 61 70 29 29 3b 0d 09 | 09 09 43 6f 70 79 42 69 |Map));..|..CopyBi|
|00001c10| 74 73 28 20 2a 28 70 72 | 6f 74 6f 6e 5f 62 6d 61 |ts( *(pr|oton_bma|
|00001c20| 70 2d 3e 70 6f 72 74 50 | 69 78 4d 61 70 29 2c 20 |p->portP|ixMap), |
|00001c30| 26 74 68 65 50 6f 72 74 | 2d 3e 70 6f 72 74 42 69 |&thePort|->portBi|
|00001c40| 74 73 2c 20 0d 09 09 09 | 09 09 26 6f 66 66 72 65 |ts, ....|..&offre|
|00001c50| 63 74 2c 20 26 63 6c 69 | 70 70 65 72 2c 20 28 73 |ct, &cli|pper, (s|
|00001c60| 68 6f 72 74 29 20 73 72 | 63 43 6f 70 79 2c 20 0d |hort) sr|cCopy, .|
|00001c70| 09 09 09 09 09 28 52 67 | 6e 48 61 6e 64 6c 65 29 |.....(Rg|nHandle)|
|00001c80| 20 4e 49 4c 29 3b 0d 09 | 09 09 48 55 6e 6c 6f 63 | NIL);..|..HUnloc|
|00001c90| 6b 28 28 48 61 6e 64 6c | 65 29 20 28 70 72 6f 74 |k((Handl|e) (prot|
|00001ca0| 6f 6e 5f 62 6d 61 70 2d | 3e 70 6f 72 74 50 69 78 |on_bmap-|>portPix|
|00001cb0| 4d 61 70 29 29 3b 0d 09 | 09 7d 0d 09 09 65 6c 73 |Map));..|.}...els|
|00001cc0| 65 0d 09 09 7b 0d 09 09 | 09 53 65 74 4f 72 69 67 |e...{...|.SetOrig|
|00001cd0| 69 6e 28 20 73 31 5f 6f | 66 66 5f 6c 65 66 74 2c |in( s1_o|ff_left,|
|00001ce0| 20 73 31 5f 6f 66 66 5f | 74 6f 70 20 29 3b 0d 09 | s1_off_|top );..|
|00001cf0| 09 09 66 6f 72 20 28 20 | 69 20 3d 20 30 3b 20 69 |..for ( |i = 0; i|
|00001d00| 20 3c 20 61 6c 6c 5f 6d | 79 5f 63 6f 6c 6f 72 73 | < all_m|y_colors|
|00001d10| 3b 20 69 2b 2b 29 0d 09 | 09 09 7b 0d 09 09 09 09 |; i++)..|..{.....|
|00001d20| 50 6d 46 6f 72 65 43 6f | 6c 6f 72 28 20 69 20 29 |PmForeCo|lor( i )|
|00001d30| 3b 0d 09 09 09 09 4d 6f | 76 65 54 6f 28 20 30 2c |;.....Mo|veTo( 0,|
|00001d40| 20 69 20 29 3b 0d 09 09 | 09 09 4c 69 6e 65 54 6f | i );...|..LineTo|
|00001d50| 28 20 33 30 30 2c 20 69 | 20 29 3b 0d 09 09 09 7d |( 300, i| );....}|
|00001d60| 0d 09 09 09 53 65 74 4f | 72 69 67 69 6e 28 20 30 |....SetO|rigin( 0|
|00001d70| 2c 20 30 29 3b 0d 09 09 | 7d 0d 09 7d 0d 09 43 6c |, 0);...|}..}..Cl|
|00001d80| 69 70 52 65 63 74 28 20 | 26 70 72 6f 74 6f 6e 5f |ipRect( |&proton_|
|00001d90| 57 69 6e 64 6f 77 2d 3e | 70 6f 72 74 52 65 63 74 |Window->|portRect|
|00001da0| 20 29 3b 20 0d 7d 0d 0d | 2f 2a 20 45 6e 64 20 6f | ); .}..|/* End o|
|00001db0| 66 20 55 70 44 61 74 65 | 20 2a 2f 0d 0d 2f 2a 20 |f UpDate| */../* |
|00001dc0| 20 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | =======|========|
|00001dd0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001de0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 20 20 2a 2f |========|==== */|
|00001df0| 0d 2f 2a 20 76 65 72 74 | 69 63 61 6c 20 73 63 72 |./* vert|ical scr|
|00001e00| 6f 6c 6c 20 62 61 72 20 | 2a 2f 0d 0d 73 74 61 74 |oll bar |*/..stat|
|00001e10| 69 63 20 76 6f 69 64 20 | 48 61 6e 64 6c 65 56 53 |ic void |HandleVS|
|00001e20| 63 72 6f 6c 6c 42 61 72 | 20 28 63 6f 64 65 2c 20 |crollBar| (code, |
|00001e30| 53 74 61 72 74 2c 20 53 | 74 6f 70 2c 20 49 6e 63 |Start, S|top, Inc|
|00001e40| 72 65 6d 65 6e 74 2c 20 | 4c 49 6e 63 72 65 6d 65 |rement, |LIncreme|
|00001e50| 6e 74 2c 0d 09 09 09 09 | 09 09 09 20 20 74 68 65 |nt,.....|... the|
|00001e60| 43 6f 6e 74 72 6f 6c 2c | 20 6d 79 50 74 29 0d 09 |Control,| myPt)..|
|00001e70| 73 68 6f 72 74 20 63 6f | 64 65 3b 09 09 09 09 09 |short co|de;.....|
|00001e80| 2f 2a 20 20 53 65 6c 65 | 63 74 69 6f 6e 20 63 6f |/* Sele|ction co|
|00001e90| 64 65 20 66 6f 72 20 70 | 61 72 74 20 6f 66 20 73 |de for p|art of s|
|00001ea0| 63 72 6f 6c 6c 20 62 61 | 72 20 20 2a 2f 0d 09 73 |croll ba|r */..s|
|00001eb0| 68 6f 72 74 20 53 74 61 | 72 74 3b 09 09 09 09 2f |hort Sta|rt;..../|
|00001ec0| 2a 20 20 4d 69 6e 69 6d | 75 6d 20 76 61 6c 75 65 |* Minim|um value|
|00001ed0| 20 74 68 65 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 | the scr|oll bar |
|00001ee0| 63 61 6e 20 61 73 73 75 | 6d 65 20 2a 2f 0d 09 73 |can assu|me */..s|
|00001ef0| 68 6f 72 74 20 53 74 6f | 70 3b 09 09 09 09 09 2f |hort Sto|p;...../|
|00001f00| 2a 20 20 4d 61 78 69 6d | 75 6d 20 76 61 6c 75 65 |* Maxim|um value|
|00001f10| 20 74 68 65 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 | the scr|oll bar |
|00001f20| 63 61 6e 20 61 73 73 75 | 6d 65 20 2a 2f 0d 09 73 |can assu|me */..s|
|00001f30| 68 6f 72 74 20 4c 49 6e | 63 72 65 6d 65 6e 74 2c |hort LIn|crement,|
|00001f40| 20 49 6e 63 72 65 6d 65 | 6e 74 3b 09 2f 2a 20 20 | Increme|nt;./* |
|00001f50| 49 6e 63 72 65 6d 65 6e | 74 20 74 6f 20 6d 6f 76 |Incremen|t to mov|
|00001f60| 65 20 77 68 65 6e 20 70 | 72 65 73 73 65 64 20 69 |e when p|ressed i|
|00001f70| 6e 20 61 6e 2a 2f 0d 09 | 43 6f 6e 74 72 6f 6c 48 |n an*/..|ControlH|
|00001f80| 61 6e 64 6c 65 20 74 68 | 65 43 6f 6e 74 72 6f 6c |andle th|eControl|
|00001f90| 3b 09 2f 2a 20 20 48 61 | 6e 64 6c 65 20 74 6f 20 |;./* Ha|ndle to |
|00001fa0| 74 68 65 20 73 63 72 6f | 6c 6c 20 62 61 72 20 63 |the scro|ll bar c|
|00001fb0| 6f 6e 74 72 6f 6c 20 2a | 2f 0d 09 50 6f 69 6e 74 |ontrol *|/..Point|
|00001fc0| 20 6d 79 50 74 3b 09 09 | 09 09 09 2f 2a 20 20 52 | myPt;..|.../* R|
|00001fd0| 65 74 75 72 6e 65 64 20 | 70 6f 69 6e 74 20 66 72 |eturned |point fr|
|00001fe0| 6f 6d 20 74 72 61 63 6b | 20 74 68 65 20 73 63 72 |om track| the scr|
|00001ff0| 6f 6c 6c 62 61 72 20 2a | 2f 0d 7b 09 09 09 09 09 |ollbar *|/.{.....|
|00002000| 09 2f 2a 20 20 53 74 61 | 72 74 20 6f 66 20 74 68 |./* Sta|rt of th|
|00002010| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 2a 2f 0d 09 |is funct|ion */..|
|00002020| 73 68 6f 72 74 20 74 68 | 65 56 61 6c 75 65 3b 09 |short th|eValue;.|
|00002030| 09 09 2f 2a 20 20 56 61 | 6c 75 65 20 6f 66 20 74 |../* Va|lue of t|
|00002040| 68 65 20 73 63 72 6f 6c | 6c 62 61 72 20 2a 2f 0d |he scrol|lbar */.|
|00002050| 09 6c 6f 6e 67 20 4d 61 | 78 54 69 63 6b 3b 09 09 |.long Ma|xTick;..|
|00002060| 09 2f 2a 20 20 54 69 6d | 65 72 20 75 73 65 64 20 |./* Tim|er used |
|00002070| 66 6f 72 20 72 65 70 65 | 61 74 20 73 63 72 6f 6c |for repe|at scrol|
|00002080| 6c 69 6e 67 20 2a 2f 0d | 0d 09 64 6f 09 09 09 09 |ling */.|..do....|
|00002090| 09 09 2f 2a 20 44 6f 20 | 74 68 65 20 73 63 72 6f |../* Do |the scro|
|000020a0| 6c 6c 20 61 73 20 6c 6f | 6e 67 20 61 73 20 74 68 |ll as lo|ng as th|
|000020b0| 65 20 62 75 74 74 6f 6e | 20 69 73 20 64 6f 2a 2f |e button| is do*/|
|000020c0| 0d 09 7b 09 09 09 09 09 | 2f 2a 20 54 69 6d 65 72 |..{.....|/* Timer|
|000020d0| 20 75 73 65 64 20 66 6f | 72 20 72 65 70 65 61 74 | used fo|r repeat|
|000020e0| 20 73 63 72 6f 6c 6c 69 | 6e 67 20 2a 2f 0d 09 09 | scrolli|ng */...|
|000020f0| 48 69 6c 69 74 65 43 6f | 6e 74 72 6f 6c 20 28 74 |HiliteCo|ntrol (t|
|00002100| 68 65 43 6f 6e 74 72 6f | 6c 2c 20 63 6f 64 65 29 |heContro|l, code)|
|00002110| 3b 09 2f 2a 20 44 61 72 | 6b 65 6e 20 74 68 65 20 |;./* Dar|ken the |
|00002120| 61 72 72 6f 77 20 2a 2f | 0d 09 09 74 68 65 56 61 |arrow */|...theVa|
|00002130| 6c 75 65 20 3d 20 47 65 | 74 43 74 6c 56 61 6c 75 |lue = Ge|tCtlValu|
|00002140| 65 20 28 74 68 65 43 6f | 6e 74 72 6f 6c 29 3b 09 |e (theCo|ntrol);.|
|00002150| 2f 2a 20 47 65 74 20 63 | 75 72 72 65 6e 74 20 73 |/* Get c|urrent s|
|00002160| 74 61 74 65 20 2a 2f 0d | 0d 09 09 69 66 20 28 63 |tate */.|...if (c|
|00002170| 6f 64 65 20 3d 3d 20 69 | 6e 55 70 42 75 74 74 6f |ode == i|nUpButto|
|00002180| 6e 29 09 2f 2a 20 53 65 | 65 20 69 66 20 69 6e 20 |n)./* Se|e if in |
|00002190| 74 68 65 20 55 70 20 61 | 72 72 6f 77 20 2a 2f 0d |the Up a|rrow */.|
|000021a0| 09 09 7b 0d 09 09 09 74 | 68 65 56 61 6c 75 65 20 |..{....t|heValue |
|000021b0| 3d 20 74 68 65 56 61 6c | 75 65 20 2d 20 49 6e 63 |= theVal|ue - Inc|
|000021c0| 72 65 6d 65 6e 74 3b 09 | 2f 2a 20 53 75 62 74 72 |rement;.|/* Subtr|
|000021d0| 61 63 74 20 74 68 65 20 | 73 69 6e 67 6c 65 20 64 |act the |single d|
|000021e0| 2a 2f 0d 09 09 09 69 66 | 20 28 74 68 65 56 61 6c |*/....if| (theVal|
|000021f0| 75 65 20 3c 20 53 74 61 | 72 74 29 09 2f 2a 20 43 |ue < Sta|rt)./* C|
|00002200| 68 65 63 6b 20 66 6f 72 | 20 62 6f 75 6e 64 61 72 |heck for| boundar|
|00002210| 79 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 2a 2f 0d |y condit|ions */.|
|00002220| 09 09 09 09 74 68 65 56 | 61 6c 75 65 20 3d 20 53 |....theV|alue = S|
|00002230| 74 61 72 74 3b 09 2f 2a | 20 50 69 6e 20 61 74 20 |tart;./*| Pin at |
|00002240| 74 68 65 20 73 74 61 72 | 74 20 76 61 6c 75 65 20 |the star|t value |
|00002250| 2a 2f 0d 09 09 7d 0d 0d | 09 09 69 66 20 28 63 6f |*/...}..|..if (co|
|00002260| 64 65 20 3d 3d 20 69 6e | 44 6f 77 6e 42 75 74 74 |de == in|DownButt|
|00002270| 6f 6e 29 09 2f 2a 20 53 | 65 65 20 69 66 20 69 6e |on)./* S|ee if in|
|00002280| 20 74 68 65 20 44 6f 77 | 6e 20 61 72 72 6f 77 20 | the Dow|n arrow |
|00002290| 2a 2f 0d 09 09 7b 0d 09 | 09 09 74 68 65 56 61 6c |*/...{..|..theVal|
|000022a0| 75 65 20 3d 20 74 68 65 | 56 61 6c 75 65 20 2b 20 |ue = the|Value + |
|000022b0| 49 6e 63 72 65 6d 65 6e | 74 3b 09 2f 2a 20 41 64 |Incremen|t;./* Ad|
|000022c0| 64 20 74 68 65 20 73 69 | 6e 67 6c 65 20 64 65 63 |d the si|ngle dec|
|000022d0| 72 65 6d 2a 2f 0d 09 09 | 09 69 66 20 28 74 68 65 |rem*/...|.if (the|
|000022e0| 56 61 6c 75 65 20 3e 20 | 53 74 6f 70 29 09 2f 2a |Value > |Stop)./*|
|000022f0| 20 43 68 65 63 6b 20 66 | 6f 72 20 62 6f 75 6e 64 | Check f|or bound|
|00002300| 61 72 79 20 63 6f 6e 64 | 69 74 69 6f 6e 73 20 2a |ary cond|itions *|
|00002310| 2f 0d 09 09 09 09 74 68 | 65 56 61 6c 75 65 20 3d |/.....th|eValue =|
|00002320| 20 53 74 6f 70 3b 09 2f | 2a 20 50 69 6e 20 61 74 | Stop;./|* Pin at|
|00002330| 20 74 68 65 20 73 74 6f | 70 20 76 61 6c 75 65 20 | the sto|p value |
|00002340| 2a 2f 0d 09 09 7d 0d 0d | 09 09 69 66 20 28 63 6f |*/...}..|..if (co|
|00002350| 64 65 20 3d 3d 20 69 6e | 50 61 67 65 55 70 29 09 |de == in|PageUp).|
|00002360| 2f 2a 20 53 65 65 20 69 | 66 20 69 6e 20 74 68 65 |/* See i|f in the|
|00002370| 20 75 70 2f 6c 65 66 74 | 20 67 72 65 79 20 61 72 | up/left| grey ar|
|00002380| 65 61 20 2a 2f 0d 09 09 | 7b 0d 09 09 09 74 68 65 |ea */...|{....the|
|00002390| 56 61 6c 75 65 20 3d 20 | 74 68 65 56 61 6c 75 65 |Value = |theValue|
|000023a0| 20 2d 20 4c 49 6e 63 72 | 65 6d 65 6e 74 3b 09 2f | - LIncr|ement;./|
|000023b0| 2a 20 53 75 62 74 72 61 | 63 74 20 74 68 65 20 70 |* Subtra|ct the p|
|000023c0| 61 67 65 20 69 6e 63 2a | 2f 0d 09 09 09 69 66 20 |age inc*|/....if |
|000023d0| 28 74 68 65 56 61 6c 75 | 65 20 3c 20 53 74 61 72 |(theValu|e < Star|
|000023e0| 74 29 09 2f 2a 20 43 68 | 65 63 6b 20 66 6f 72 20 |t)./* Ch|eck for |
|000023f0| 62 6f 75 6e 64 61 72 79 | 20 63 6f 6e 64 69 74 69 |boundary| conditi|
|00002400| 6f 6e 73 20 2a 2f 0d 09 | 09 09 09 74 68 65 56 61 |ons */..|...theVa|
|00002410| 6c 75 65 20 3d 20 53 74 | 61 72 74 3b 09 2f 2a 20 |lue = St|art;./* |
|00002420| 50 69 6e 20 61 74 20 74 | 68 65 20 53 74 61 72 74 |Pin at t|he Start|
|00002430| 20 76 61 6c 75 65 20 2a | 2f 0d 09 09 7d 0d 0d 09 | value *|/...}...|
|00002440| 09 69 66 20 28 63 6f 64 | 65 20 3d 3d 20 69 6e 50 |.if (cod|e == inP|
|00002450| 61 67 65 44 6f 77 6e 29 | 09 2f 2a 20 53 65 65 20 |ageDown)|./* See |
|00002460| 69 66 20 69 6e 20 74 68 | 65 20 64 6f 77 6e 2f 72 |if in th|e down/r|
|00002470| 69 67 68 74 20 67 72 65 | 79 20 61 72 65 61 20 2a |ight gre|y area *|
|00002480| 2f 0d 09 09 7b 0d 09 09 | 09 74 68 65 56 61 6c 75 |/...{...|.theValu|
|00002490| 65 20 3d 20 74 68 65 56 | 61 6c 75 65 20 2b 20 4c |e = theV|alue + L|
|000024a0| 49 6e 63 72 65 6d 65 6e | 74 3b 09 2f 2a 20 41 64 |Incremen|t;./* Ad|
|000024b0| 64 20 74 68 65 20 70 61 | 67 65 20 69 6e 63 72 65 |d the pa|ge incre|
|000024c0| 6d 65 6e 2a 2f 0d 09 09 | 09 69 66 20 28 74 68 65 |men*/...|.if (the|
|000024d0| 56 61 6c 75 65 20 3e 20 | 53 74 6f 70 29 09 2f 2a |Value > |Stop)./*|
|000024e0| 20 43 68 65 63 6b 20 66 | 6f 72 20 62 6f 75 6e 64 | Check f|or bound|
|000024f0| 61 72 79 20 63 6f 6e 64 | 69 74 69 6f 6e 73 20 2a |ary cond|itions *|
|00002500| 2f 0d 09 09 09 09 74 68 | 65 56 61 6c 75 65 20 3d |/.....th|eValue =|
|00002510| 20 53 74 6f 70 3b 09 2f | 2a 20 50 69 6e 20 61 74 | Stop;./|* Pin at|
|00002520| 20 74 68 65 20 53 74 6f | 70 20 76 61 6c 75 65 20 | the Sto|p value |
|00002530| 2a 2f 0d 09 09 7d 0d 0d | 09 09 69 66 20 28 63 6f |*/...}..|..if (co|
|00002540| 64 65 20 3d 3d 20 69 6e | 54 68 75 6d 62 29 09 2f |de == in|Thumb)./|
|00002550| 2a 20 53 65 65 20 69 66 | 20 69 6e 20 74 68 65 20 |* See if| in the |
|00002560| 64 72 61 67 20 62 6f 78 | 20 61 72 65 61 20 2a 2f |drag box| area */|
|00002570| 0d 09 09 7b 0d 09 09 09 | 63 6f 64 65 20 3d 20 54 |...{....|code = T|
|00002580| 72 61 63 6b 43 6f 6e 74 | 72 6f 6c 20 28 74 68 65 |rackCont|rol (the|
|00002590| 43 6f 6e 74 72 6f 6c 2c | 20 6d 79 50 74 2c 20 4e |Control,| myPt, N|
|000025a0| 49 4c 29 3b 09 2f 2a 20 | 4c 65 74 20 74 68 65 20 |IL);./* |Let the |
|000025b0| 4f 2a 2f 0d 09 09 09 74 | 68 65 56 61 6c 75 65 20 |O*/....t|heValue |
|000025c0| 3d 20 47 65 74 43 74 6c | 56 61 6c 75 65 20 28 74 |= GetCtl|Value (t|
|000025d0| 68 65 43 6f 6e 74 72 6f | 6c 29 3b 09 2f 2a 20 47 |heContro|l);./* G|
|000025e0| 65 74 20 63 75 72 72 65 | 6e 74 20 73 74 61 74 65 |et curre|nt state|
|000025f0| 2a 2f 0d 09 09 7d 0d 0d | 09 09 53 65 74 43 74 6c |*/...}..|..SetCtl|
|00002600| 56 61 6c 75 65 20 28 74 | 68 65 43 6f 6e 74 72 6f |Value (t|heContro|
|00002610| 6c 2c 20 74 68 65 56 61 | 6c 75 65 29 3b 09 2f 2a |l, theVa|lue);./*|
|00002620| 20 53 65 74 20 6e 65 77 | 20 73 74 61 74 65 20 2a | Set new| state *|
|00002630| 2f 0d 0d 09 09 73 31 5f | 6f 66 66 5f 74 6f 70 20 |/....s1_|off_top |
|00002640| 3d 20 28 73 68 6f 72 74 | 29 20 28 20 28 64 6f 75 |= (short|) ( (dou|
|00002650| 62 6c 65 29 20 28 70 72 | 6f 74 6f 6e 5f 72 65 63 |ble) (pr|oton_rec|
|00002660| 74 2e 62 6f 74 74 6f 6d | 20 2d 20 70 72 6f 74 6f |t.bottom| - proto|
|00002670| 6e 5f 72 65 63 74 2e 74 | 6f 70 29 20 0d 09 09 09 |n_rect.t|op) ....|
|00002680| 09 09 09 09 2a 20 28 64 | 6f 75 62 6c 65 29 20 74 |....* (d|ouble) t|
|00002690| 68 65 56 61 6c 75 65 20 | 2f 20 28 64 6f 75 62 6c |heValue |/ (doubl|
|000026a0| 65 29 20 28 53 74 6f 70 | 20 2d 20 53 74 61 72 74 |e) (Stop| - Start|
|000026b0| 29 20 29 3b 0d 09 09 0d | 09 09 64 72 61 77 5f 70 |) );....|..draw_p|
|000026c0| 72 6f 74 6f 6e 28 29 3b | 0d 0d 09 09 4d 61 78 54 |roton();|....MaxT|
|000026d0| 69 63 6b 20 3d 20 54 69 | 63 6b 43 6f 75 6e 74 20 |ick = Ti|ckCount |
|000026e0| 28 29 20 2b 20 39 3b 09 | 2f 2a 20 54 69 6d 65 20 |() + 9;.|/* Time |
|000026f0| 64 65 6c 61 79 20 66 6f | 72 20 61 75 74 6f 2d 73 |delay fo|r auto-s|
|00002700| 63 72 6f 6c 6c 20 2a 2f | 0d 09 09 64 6f 09 2f 2a |croll */|...do./*|
|00002710| 20 53 74 61 72 74 20 6f | 66 20 64 65 6c 61 79 20 | Start o|f delay |
|00002720| 72 6f 75 74 69 6e 65 20 | 2a 2f 0d 09 09 7b 20 2f |routine |*/...{ /|
|00002730| 2a 20 53 70 69 6e 20 6f | 6e 20 64 6f 69 6e 67 20 |* Spin o|n doing |
|00002740| 6e 6f 74 68 69 6e 67 20 | 2a 2f 0d 09 09 7d 20 77 |nothing |*/...} w|
|00002750| 68 69 6c 65 20 28 28 42 | 75 74 74 6f 6e 20 28 29 |hile ((B|utton ()|
|00002760| 20 3d 3d 20 54 52 55 45 | 29 20 26 26 20 28 54 69 | == TRUE|) && (Ti|
|00002770| 63 6b 43 6f 75 6e 74 20 | 28 29 20 3c 3d 20 4d 61 |ckCount |() <= Ma|
|00002780| 78 54 69 63 6b 29 29 3b | 09 2f 2a 20 45 2a 2f 0d |xTick));|./* E*/.|
|00002790| 0d 09 09 48 69 6c 69 74 | 65 43 6f 6e 74 72 6f 6c |...Hilit|eControl|
|000027a0| 20 28 74 68 65 43 6f 6e | 74 72 6f 6c 2c 20 30 29 | (theCon|trol, 0)|
|000027b0| 3b 09 2f 2a 20 4c 69 67 | 68 74 65 6e 20 74 68 65 |;./* Lig|hten the|
|000027c0| 20 61 72 72 6f 77 20 2a | 2f 0d 09 7d 09 09 09 09 | arrow *|/..}....|
|000027d0| 09 2f 2a 20 45 6e 64 20 | 66 6f 72 20 53 74 69 6c |./* End |for Stil|
|000027e0| 6c 44 6f 77 6e 20 2a 2f | 0d 09 77 68 69 6c 65 20 |lDown */|..while |
|000027f0| 28 53 74 69 6c 6c 44 6f | 77 6e 20 28 29 20 3d 3d |(StillDo|wn () ==|
|00002800| 20 54 52 55 45 29 3b 09 | 2f 2a 20 45 6e 64 20 66 | TRUE);.|/* End f|
|00002810| 6f 72 20 53 74 69 6c 6c | 44 6f 77 6e 20 2a 2f 0d |or Still|Down */.|
|00002820| 7d 0d 0d 2f 2a 20 45 6e | 64 20 66 6f 72 20 48 61 |}../* En|d for Ha|
|00002830| 6e 64 6c 65 56 53 63 72 | 6f 6c 6c 42 61 72 20 2a |ndleVScr|ollBar *|
|00002840| 2f 0d 0d 2f 2a 20 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |/../* ==|========|
|00002850| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002860| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002870| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 20 2a 2f 0d |========|==== */.|
|00002880| 0d 2f 2a 20 68 6f 72 69 | 7a 6f 6e 74 61 6c 20 73 |./* hori|zontal s|
|00002890| 63 72 6f 6c 6c 20 62 61 | 72 20 2a 2f 0d 0d 73 74 |croll ba|r */..st|
|000028a0| 61 74 69 63 20 76 6f 69 | 64 20 48 61 6e 64 6c 65 |atic voi|d Handle|
|000028b0| 48 53 63 72 6f 6c 6c 42 | 61 72 20 28 63 6f 64 65 |HScrollB|ar (code|
|000028c0| 2c 20 53 74 61 72 74 2c | 20 53 74 6f 70 2c 20 49 |, Start,| Stop, I|
|000028d0| 6e 63 72 65 6d 65 6e 74 | 2c 20 4c 49 6e 63 72 65 |ncrement|, LIncre|
|000028e0| 6d 65 6e 74 2c 0d 09 09 | 09 09 09 09 09 20 20 74 |ment,...|..... t|
|000028f0| 68 65 43 6f 6e 74 72 6f | 6c 2c 20 6d 79 50 74 29 |heContro|l, myPt)|
|00002900| 0d 09 73 68 6f 72 74 20 | 63 6f 64 65 3b 09 09 09 |..short |code;...|
|00002910| 09 09 2f 2a 20 20 53 65 | 6c 65 63 74 69 6f 6e 20 |../* Se|lection |
|00002920| 63 6f 64 65 20 66 6f 72 | 20 70 61 72 74 20 6f 66 |code for| part of|
|00002930| 20 73 63 72 6f 6c 6c 20 | 62 61 72 20 20 2a 2f 0d | scroll |bar */.|
|00002940| 09 73 68 6f 72 74 20 53 | 74 61 72 74 3b 09 09 09 |.short S|tart;...|
|00002950| 09 2f 2a 20 20 4d 69 6e | 69 6d 75 6d 20 76 61 6c |./* Min|imum val|
|00002960| 75 65 20 74 68 65 20 73 | 63 72 6f 6c 6c 20 62 61 |ue the s|croll ba|
|00002970| 72 20 63 61 6e 20 61 73 | 73 75 6d 65 20 2a 2f 0d |r can as|sume */.|
|00002980| 09 73 68 6f 72 74 20 53 | 74 6f 70 3b 09 09 09 09 |.short S|top;....|
|00002990| 09 2f 2a 20 20 4d 61 78 | 69 6d 75 6d 20 76 61 6c |./* Max|imum val|
|000029a0| 75 65 20 74 68 65 20 73 | 63 72 6f 6c 6c 20 62 61 |ue the s|croll ba|
|000029b0| 72 20 63 61 6e 20 61 73 | 73 75 6d 65 20 2a 2f 0d |r can as|sume */.|
|000029c0| 09 73 68 6f 72 74 20 4c | 49 6e 63 72 65 6d 65 6e |.short L|Incremen|
|000029d0| 74 2c 20 49 6e 63 72 65 | 6d 65 6e 74 3b 09 2f 2a |t, Incre|ment;./*|
|000029e0| 20 20 49 6e 63 72 65 6d | 65 6e 74 20 74 6f 20 6d | Increm|ent to m|
|000029f0| 6f 76 65 20 77 68 65 6e | 20 70 72 65 73 73 65 64 |ove when| pressed|
|00002a00| 20 69 6e 20 61 6e 2a 2f | 0d 09 43 6f 6e 74 72 6f | in an*/|..Contro|
|00002a10| 6c 48 61 6e 64 6c 65 20 | 74 68 65 43 6f 6e 74 72 |lHandle |theContr|
|00002a20| 6f 6c 3b 09 2f 2a 20 20 | 48 61 6e 64 6c 65 20 74 |ol;./* |Handle t|
|00002a30| 6f 20 74 68 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |o the sc|roll bar|
|00002a40| 20 63 6f 6e 74 72 6f 6c | 20 2a 2f 0d 09 50 6f 69 | control| */..Poi|
|00002a50| 6e 74 20 6d 79 50 74 3b | 09 09 09 09 09 2f 2a 20 |nt myPt;|...../* |
|00002a60| 20 52 65 74 75 72 6e 65 | 64 20 70 6f 69 6e 74 20 | Returne|d point |
|00002a70| 66 72 6f 6d 20 74 72 61 | 63 6b 20 74 68 65 20 73 |from tra|ck the s|
|00002a80| 63 72 6f 6c 6c 62 61 72 | 20 2a 2f 0d 7b 09 09 09 |crollbar| */.{...|
|00002a90| 09 09 09 2f 2a 20 20 53 | 74 61 72 74 20 6f 66 20 |.../* S|tart of |
|00002aa0| 74 68 69 73 20 66 75 6e | 63 74 69 6f 6e 20 2a 2f |this fun|ction */|
|00002ab0| 0d 09 73 68 6f 72 74 20 | 74 68 65 56 61 6c 75 65 |..short |theValue|
|00002ac0| 3b 09 09 09 2f 2a 20 20 | 56 61 6c 75 65 20 6f 66 |;.../* |Value of|
|00002ad0| 20 74 68 65 20 73 63 72 | 6f 6c 6c 62 61 72 20 2a | the scr|ollbar *|
|00002ae0| 2f 0d 09 6c 6f 6e 67 20 | 4d 61 78 54 69 63 6b 3b |/..long |MaxTick;|
|00002af0| 09 09 09 2f 2a 20 20 54 | 69 6d 65 72 20 75 73 65 |.../* T|imer use|
|00002b00| 64 20 66 6f 72 20 72 65 | 70 65 61 74 20 73 63 72 |d for re|peat scr|
|00002b10| 6f 6c 6c 69 6e 67 20 2a | 2f 0d 0d 09 64 6f 09 09 |olling *|/...do..|
|00002b20| 09 09 09 09 2f 2a 20 44 | 6f 20 74 68 65 20 73 63 |..../* D|o the sc|
|00002b30| 72 6f 6c 6c 20 61 73 20 | 6c 6f 6e 67 20 61 73 20 |roll as |long as |
|00002b40| 74 68 65 20 62 75 74 74 | 6f 6e 20 69 73 20 64 6f |the butt|on is do|
|00002b50| 2a 2f 0d 09 7b 09 09 09 | 09 09 2f 2a 20 54 69 6d |*/..{...|../* Tim|
|00002b60| 65 72 20 75 73 65 64 20 | 66 6f 72 20 72 65 70 65 |er used |for repe|
|00002b70| 61 74 20 73 63 72 6f 6c | 6c 69 6e 67 20 2a 2f 0d |at scrol|ling */.|
|00002b80| 09 09 48 69 6c 69 74 65 | 43 6f 6e 74 72 6f 6c 20 |..Hilite|Control |
|00002b90| 28 74 68 65 43 6f 6e 74 | 72 6f 6c 2c 20 63 6f 64 |(theCont|rol, cod|
|00002ba0| 65 29 3b 09 2f 2a 20 44 | 61 72 6b 65 6e 20 74 68 |e);./* D|arken th|
|00002bb0| 65 20 61 72 72 6f 77 20 | 2a 2f 0d 09 09 74 68 65 |e arrow |*/...the|
|00002bc0| 56 61 6c 75 65 20 3d 20 | 47 65 74 43 74 6c 56 61 |Value = |GetCtlVa|
|00002bd0| 6c 75 65 20 28 74 68 65 | 43 6f 6e 74 72 6f 6c 29 |lue (the|Control)|
|00002be0| 3b 09 2f 2a 20 47 65 74 | 20 63 75 72 72 65 6e 74 |;./* Get| current|
|00002bf0| 20 73 74 61 74 65 20 2a | 2f 0d 0d 09 09 69 66 20 | state *|/....if |
|00002c00| 28 63 6f 64 65 20 3d 3d | 20 69 6e 55 70 42 75 74 |(code ==| inUpBut|
|00002c10| 74 6f 6e 29 09 2f 2a 20 | 53 65 65 20 69 66 20 69 |ton)./* |See if i|
|00002c20| 6e 20 74 68 65 20 55 70 | 20 61 72 72 6f 77 20 2a |n the Up| arrow *|
|00002c30| 2f 0d 09 09 7b 0d 09 09 | 09 74 68 65 56 61 6c 75 |/...{...|.theValu|
|00002c40| 65 20 3d 20 74 68 65 56 | 61 6c 75 65 20 2d 20 49 |e = theV|alue - I|
|00002c50| 6e 63 72 65 6d 65 6e 74 | 3b 09 2f 2a 20 53 75 62 |ncrement|;./* Sub|
|00002c60| 74 72 61 63 74 20 74 68 | 65 20 73 69 6e 67 6c 65 |tract th|e single|
|00002c70| 20 64 2a 2f 0d 09 09 09 | 69 66 20 28 74 68 65 56 | d*/....|if (theV|
|00002c80| 61 6c 75 65 20 3c 20 53 | 74 61 72 74 29 09 2f 2a |alue < S|tart)./*|
|00002c90| 20 43 68 65 63 6b 20 66 | 6f 72 20 62 6f 75 6e 64 | Check f|or bound|
|00002ca0| 61 72 79 20 63 6f 6e 64 | 69 74 69 6f 6e 73 20 2a |ary cond|itions *|
|00002cb0| 2f 0d 09 09 09 09 74 68 | 65 56 61 6c 75 65 20 3d |/.....th|eValue =|
|00002cc0| 20 53 74 61 72 74 3b 09 | 2f 2a 20 50 69 6e 20 61 | Start;.|/* Pin a|
|00002cd0| 74 20 74 68 65 20 73 74 | 61 72 74 20 76 61 6c 75 |t the st|art valu|
|00002ce0| 65 20 2a 2f 0d 09 09 7d | 0d 0d 09 09 69 66 20 28 |e */...}|....if (|
|00002cf0| 63 6f 64 65 20 3d 3d 20 | 69 6e 44 6f 77 6e 42 75 |code == |inDownBu|
|00002d00| 74 74 6f 6e 29 09 2f 2a | 20 53 65 65 20 69 66 20 |tton)./*| See if |
|00002d10| 69 6e 20 74 68 65 20 44 | 6f 77 6e 20 61 72 72 6f |in the D|own arro|
|00002d20| 77 20 2a 2f 0d 09 09 7b | 0d 09 09 09 74 68 65 56 |w */...{|....theV|
|00002d30| 61 6c 75 65 20 3d 20 74 | 68 65 56 61 6c 75 65 20 |alue = t|heValue |
|00002d40| 2b 20 49 6e 63 72 65 6d | 65 6e 74 3b 09 2f 2a 20 |+ Increm|ent;./* |
|00002d50| 41 64 64 20 74 68 65 20 | 73 69 6e 67 6c 65 20 64 |Add the |single d|
|00002d60| 65 63 72 65 6d 2a 2f 0d | 09 09 09 69 66 20 28 74 |ecrem*/.|...if (t|
|00002d70| 68 65 56 61 6c 75 65 20 | 3e 20 53 74 6f 70 29 09 |heValue |> Stop).|
|00002d80| 2f 2a 20 43 68 65 63 6b | 20 66 6f 72 20 62 6f 75 |/* Check| for bou|
|00002d90| 6e 64 61 72 79 20 63 6f | 6e 64 69 74 69 6f 6e 73 |ndary co|nditions|
|00002da0| 20 2a 2f 0d 09 09 09 09 | 74 68 65 56 61 6c 75 65 | */.....|theValue|
|00002db0| 20 3d 20 53 74 6f 70 3b | 09 2f 2a 20 50 69 6e 20 | = Stop;|./* Pin |
|00002dc0| 61 74 20 74 68 65 20 73 | 74 6f 70 20 76 61 6c 75 |at the s|top valu|
|00002dd0| 65 20 2a 2f 0d 09 09 7d | 0d 0d 09 09 69 66 20 28 |e */...}|....if (|
|00002de0| 63 6f 64 65 20 3d 3d 20 | 69 6e 50 61 67 65 55 70 |code == |inPageUp|
|00002df0| 29 09 2f 2a 20 53 65 65 | 20 69 66 20 69 6e 20 74 |)./* See| if in t|
|00002e00| 68 65 20 75 70 2f 6c 65 | 66 74 20 67 72 65 79 20 |he up/le|ft grey |
|00002e10| 61 72 65 61 20 2a 2f 0d | 09 09 7b 0d 09 09 09 74 |area */.|..{....t|
|00002e20| 68 65 56 61 6c 75 65 20 | 3d 20 74 68 65 56 61 6c |heValue |= theVal|
|00002e30| 75 65 20 2d 20 4c 49 6e | 63 72 65 6d 65 6e 74 3b |ue - LIn|crement;|
|00002e40| 09 2f 2a 20 53 75 62 74 | 72 61 63 74 20 74 68 65 |./* Subt|ract the|
|00002e50| 20 70 61 67 65 20 69 6e | 63 2a 2f 0d 09 09 09 69 | page in|c*/....i|
|00002e60| 66 20 28 74 68 65 56 61 | 6c 75 65 20 3c 20 53 74 |f (theVa|lue < St|
|00002e70| 61 72 74 29 09 2f 2a 20 | 43 68 65 63 6b 20 66 6f |art)./* |Check fo|
|00002e80| 72 20 62 6f 75 6e 64 61 | 72 79 20 63 6f 6e 64 69 |r bounda|ry condi|
|00002e90| 74 69 6f 6e 73 20 2a 2f | 0d 09 09 09 09 74 68 65 |tions */|.....the|
|00002ea0| 56 61 6c 75 65 20 3d 20 | 53 74 61 72 74 3b 09 2f |Value = |Start;./|
|00002eb0| 2a 20 50 69 6e 20 61 74 | 20 74 68 65 20 53 74 61 |* Pin at| the Sta|
|00002ec0| 72 74 20 76 61 6c 75 65 | 20 2a 2f 0d 09 09 7d 0d |rt value| */...}.|
|00002ed0| 0d 09 09 69 66 20 28 63 | 6f 64 65 20 3d 3d 20 69 |...if (c|ode == i|
|00002ee0| 6e 50 61 67 65 44 6f 77 | 6e 29 09 2f 2a 20 53 65 |nPageDow|n)./* Se|
|00002ef0| 65 20 69 66 20 69 6e 20 | 74 68 65 20 64 6f 77 6e |e if in |the down|
|00002f00| 2f 72 69 67 68 74 20 67 | 72 65 79 20 61 72 65 61 |/right g|rey area|
|00002f10| 20 2a 2f 0d 09 09 7b 0d | 09 09 09 74 68 65 56 61 | */...{.|...theVa|
|00002f20| 6c 75 65 20 3d 20 74 68 | 65 56 61 6c 75 65 20 2b |lue = th|eValue +|
|00002f30| 20 4c 49 6e 63 72 65 6d | 65 6e 74 3b 09 2f 2a 20 | LIncrem|ent;./* |
|00002f40| 41 64 64 20 74 68 65 20 | 70 61 67 65 20 69 6e 63 |Add the |page inc|
|00002f50| 72 65 6d 65 6e 2a 2f 0d | 09 09 09 69 66 20 28 74 |remen*/.|...if (t|
|00002f60| 68 65 56 61 6c 75 65 20 | 3e 20 53 74 6f 70 29 09 |heValue |> Stop).|
|00002f70| 2f 2a 20 43 68 65 63 6b | 20 66 6f 72 20 62 6f 75 |/* Check| for bou|
|00002f80| 6e 64 61 72 79 20 63 6f | 6e 64 69 74 69 6f 6e 73 |ndary co|nditions|
|00002f90| 20 2a 2f 0d 09 09 09 09 | 74 68 65 56 61 6c 75 65 | */.....|theValue|
|00002fa0| 20 3d 20 53 74 6f 70 3b | 09 2f 2a 20 50 69 6e 20 | = Stop;|./* Pin |
|00002fb0| 61 74 20 74 68 65 20 53 | 74 6f 70 20 76 61 6c 75 |at the S|top valu|
|00002fc0| 65 20 2a 2f 0d 09 09 7d | 0d 0d 09 09 69 66 20 28 |e */...}|....if (|
|00002fd0| 63 6f 64 65 20 3d 3d 20 | 69 6e 54 68 75 6d 62 29 |code == |inThumb)|
|00002fe0| 09 2f 2a 20 53 65 65 20 | 69 66 20 69 6e 20 74 68 |./* See |if in th|
|00002ff0| 65 20 64 72 61 67 20 62 | 6f 78 20 61 72 65 61 20 |e drag b|ox area |
|00003000| 2a 2f 0d 09 09 7b 0d 09 | 09 09 63 6f 64 65 20 3d |*/...{..|..code =|
|00003010| 20 54 72 61 63 6b 43 6f | 6e 74 72 6f 6c 20 28 74 | TrackCo|ntrol (t|
|00003020| 68 65 43 6f 6e 74 72 6f | 6c 2c 20 6d 79 50 74 2c |heContro|l, myPt,|
|00003030| 20 4e 49 4c 29 3b 09 2f | 2a 20 4c 65 74 20 74 68 | NIL);./|* Let th|
|00003040| 65 20 4f 2a 2f 0d 09 09 | 09 74 68 65 56 61 6c 75 |e O*/...|.theValu|
|00003050| 65 20 3d 20 47 65 74 43 | 74 6c 56 61 6c 75 65 20 |e = GetC|tlValue |
|00003060| 28 74 68 65 43 6f 6e 74 | 72 6f 6c 29 3b 09 2f 2a |(theCont|rol);./*|
|00003070| 20 47 65 74 20 63 75 72 | 72 65 6e 74 20 73 74 61 | Get cur|rent sta|
|00003080| 74 65 2a 2f 0d 09 09 7d | 0d 0d 09 09 53 65 74 43 |te*/...}|....SetC|
|00003090| 74 6c 56 61 6c 75 65 20 | 28 74 68 65 43 6f 6e 74 |tlValue |(theCont|
|000030a0| 72 6f 6c 2c 20 74 68 65 | 56 61 6c 75 65 29 3b 09 |rol, the|Value);.|
|000030b0| 2f 2a 20 53 65 74 20 6e | 65 77 20 73 74 61 74 65 |/* Set n|ew state|
|000030c0| 20 2a 2f 0d 0d 09 09 73 | 31 5f 6f 66 66 5f 6c 65 | */....s|1_off_le|
|000030d0| 66 74 20 3d 20 28 73 68 | 6f 72 74 29 20 28 20 28 |ft = (sh|ort) ( (|
|000030e0| 64 6f 75 62 6c 65 29 28 | 70 72 6f 74 6f 6e 5f 72 |double)(|proton_r|
|000030f0| 65 63 74 2e 72 69 67 68 | 74 20 2d 20 70 72 6f 74 |ect.righ|t - prot|
|00003100| 6f 6e 5f 72 65 63 74 2e | 6c 65 66 74 29 20 0d 09 |on_rect.|left) ..|
|00003110| 09 09 09 09 09 09 20 2a | 20 28 64 6f 75 62 6c 65 |...... *| (double|
|00003120| 29 20 74 68 65 56 61 6c | 75 65 20 2f 20 28 64 6f |) theVal|ue / (do|
|00003130| 75 62 6c 65 29 20 28 53 | 74 6f 70 20 2d 20 53 74 |uble) (S|top - St|
|00003140| 61 72 74 29 20 29 3b 0d | 0d 09 09 64 72 61 77 5f |art) );.|...draw_|
|00003150| 70 72 6f 74 6f 6e 28 29 | 3b 0d 09 09 0d 09 09 4d |proton()|;......M|
|00003160| 61 78 54 69 63 6b 20 3d | 20 54 69 63 6b 43 6f 75 |axTick =| TickCou|
|00003170| 6e 74 20 28 29 20 2b 20 | 39 3b 09 2f 2a 20 54 69 |nt () + |9;./* Ti|
|00003180| 6d 65 20 64 65 6c 61 79 | 20 66 6f 72 20 61 75 74 |me delay| for aut|
|00003190| 6f 2d 73 63 72 6f 6c 6c | 20 2a 2f 0d 09 09 64 6f |o-scroll| */...do|
|000031a0| 09 2f 2a 20 53 74 61 72 | 74 20 6f 66 20 64 65 6c |./* Star|t of del|
|000031b0| 61 79 20 72 6f 75 74 69 | 6e 65 20 2a 2f 0d 09 09 |ay routi|ne */...|
|000031c0| 7b 20 2f 2a 20 53 70 69 | 6e 20 6f 6e 20 64 6f 69 |{ /* Spi|n on doi|
|000031d0| 6e 67 20 6e 6f 74 68 69 | 6e 67 20 2a 2f 0d 09 09 |ng nothi|ng */...|
|000031e0| 7d 20 77 68 69 6c 65 20 | 28 28 42 75 74 74 6f 6e |} while |((Button|
|000031f0| 20 28 29 20 3d 3d 20 54 | 52 55 45 29 20 26 26 20 | () == T|RUE) && |
|00003200| 28 54 69 63 6b 43 6f 75 | 6e 74 20 28 29 20 3c 3d |(TickCou|nt () <=|
|00003210| 20 4d 61 78 54 69 63 6b | 29 29 3b 09 2f 2a 20 45 | MaxTick|));./* E|
|00003220| 2a 2f 0d 0d 09 09 48 69 | 6c 69 74 65 43 6f 6e 74 |*/....Hi|liteCont|
|00003230| 72 6f 6c 20 28 74 68 65 | 43 6f 6e 74 72 6f 6c 2c |rol (the|Control,|
|00003240| 20 30 29 3b 09 2f 2a 20 | 4c 69 67 68 74 65 6e 20 | 0);./* |Lighten |
|00003250| 74 68 65 20 61 72 72 6f | 77 20 2a 2f 0d 09 7d 09 |the arro|w */..}.|
|00003260| 09 09 09 09 2f 2a 20 45 | 6e 64 20 66 6f 72 20 53 |..../* E|nd for S|
|00003270| 74 69 6c 6c 44 6f 77 6e | 20 2a 2f 0d 09 77 68 69 |tillDown| */..whi|
|00003280| 6c 65 20 28 53 74 69 6c | 6c 44 6f 77 6e 20 28 29 |le (Stil|lDown ()|
|00003290| 20 3d 3d 20 54 52 55 45 | 29 3b 09 2f 2a 20 45 6e | == TRUE|);./* En|
|000032a0| 64 20 66 6f 72 20 53 74 | 69 6c 6c 44 6f 77 6e 20 |d for St|illDown |
|000032b0| 2a 2f 0d 7d 0d 0d 2f 2a | 20 45 6e 64 20 66 6f 72 |*/.}../*| End for|
|000032c0| 20 48 61 6e 64 6c 65 48 | 53 63 72 6f 6c 6c 42 61 | HandleH|ScrollBa|
|000032d0| 72 20 2a 2f 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |r */..st|atic voi|
|000032e0| 64 20 44 6f 5f 41 5f 53 | 63 72 6f 6c 6c 42 61 72 |d Do_A_S|crollBar|
|000032f0| 20 28 63 6f 64 65 2c 20 | 74 68 65 43 6f 6e 74 72 | (code, |theContr|
|00003300| 6f 6c 2c 20 6d 79 50 74 | 29 09 2f 2a 20 48 61 6e |ol, myPt|)./* Han|
|00003310| 64 6c 65 20 61 20 53 63 | 72 6f 6c 6c 42 61 2a 2f |dle a Sc|rollBa*/|
|00003320| 0d 09 73 68 6f 72 74 20 | 63 6f 64 65 3b 09 09 09 |..short |code;...|
|00003330| 09 09 2f 2a 20 57 68 69 | 63 68 20 70 6c 61 63 65 |../* Whi|ch place|
|00003340| 20 69 6e 20 73 63 72 6f | 6c 6c 62 61 72 20 77 61 | in scro|llbar wa|
|00003350| 73 20 70 72 65 73 73 65 | 64 20 2a 2f 0d 09 43 6f |s presse|d */..Co|
|00003360| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 20 74 68 65 43 |ntrolHan|dle theC|
|00003370| 6f 6e 74 72 6f 6c 3b 09 | 2f 2a 20 57 68 69 63 68 |ontrol;.|/* Which|
|00003380| 20 70 6c 61 63 65 20 69 | 6e 20 73 63 72 6f 6c 6c | place i|n scroll|
|00003390| 62 61 72 20 77 61 73 20 | 70 72 65 73 73 65 64 20 |bar was |pressed |
|000033a0| 2a 2f 0d 09 50 6f 69 6e | 74 20 6d 79 50 74 3b 09 |*/..Poin|t myPt;.|
|000033b0| 09 09 09 09 2f 2a 20 57 | 68 65 72 65 20 74 68 65 |..../* W|here the|
|000033c0| 20 73 63 72 6f 6c 6c 62 | 61 72 20 77 61 73 20 70 | scrollb|ar was p|
|000033d0| 72 65 73 73 65 64 20 2a | 2f 0d 7b 09 09 09 09 09 |ressed *|/.{.....|
|000033e0| 09 2f 2a 20 53 74 61 72 | 74 20 6f 66 20 61 20 53 |./* Star|t of a S|
|000033f0| 63 72 6f 6c 6c 42 61 72 | 20 62 65 69 6e 67 20 70 |crollBar| being p|
|00003400| 72 65 73 73 65 64 20 2a | 2f 0d 09 73 68 6f 72 74 |ressed *|/..short|
|00003410| 20 52 65 66 43 6f 6e 3b | 0d 0d 09 52 65 66 43 6f | RefCon;|...RefCo|
|00003420| 6e 20 3d 20 47 65 74 43 | 52 65 66 43 6f 6e 20 28 |n = GetC|RefCon (|
|00003430| 74 68 65 43 6f 6e 74 72 | 6f 6c 29 3b 09 2f 2a 20 |theContr|ol);./* |
|00003440| 67 65 74 20 63 6f 6e 74 | 72 6f 6c 20 72 65 66 63 |get cont|rol refc|
|00003450| 6f 6e 20 2a 2f 0d 0d 09 | 73 77 69 74 63 68 20 28 |on */...|switch (|
|00003460| 52 65 66 43 6f 6e 29 0d | 09 7b 0d 09 09 63 61 73 |RefCon).|.{...cas|
|00003470| 65 20 49 5f 56 65 72 74 | 5f 53 63 72 6f 6c 6c 5f |e I_Vert|_Scroll_|
|00003480| 62 61 72 3a 0d 09 09 09 | 48 61 6e 64 6c 65 56 53 |bar:....|HandleVS|
|00003490| 63 72 6f 6c 6c 42 61 72 | 20 28 63 6f 64 65 2c 20 |crollBar| (code, |
|000034a0| 31 2c 20 31 30 30 2c 20 | 31 2c 20 31 30 2c 20 74 |1, 100, |1, 10, t|
|000034b0| 68 65 43 6f 6e 74 72 6f | 6c 2c 20 6d 79 50 74 29 |heContro|l, myPt)|
|000034c0| 3b 0d 09 09 09 73 72 63 | 5f 63 68 61 6e 67 65 64 |;....src|_changed|
|000034d0| 20 3d 20 54 52 55 45 3b | 0d 09 09 09 62 72 65 61 | = TRUE;|....brea|
|000034e0| 6b 3b 0d 0d 09 09 63 61 | 73 65 20 49 5f 48 6f 72 |k;....ca|se I_Hor|
|000034f0| 69 7a 5f 53 63 72 6f 6c | 6c 5f 62 61 72 3a 0d 09 |iz_Scrol|l_bar:..|
|00003500| 09 09 48 61 6e 64 6c 65 | 48 53 63 72 6f 6c 6c 42 |..Handle|HScrollB|
|00003510| 61 72 20 28 63 6f 64 65 | 2c 20 31 2c 20 31 30 30 |ar (code|, 1, 100|
|00003520| 2c 20 31 2c 20 31 30 2c | 20 74 68 65 43 6f 6e 74 |, 1, 10,| theCont|
|00003530| 72 6f 6c 2c 20 6d 79 50 | 74 29 3b 0d 09 09 09 73 |rol, myP|t);....s|
|00003540| 72 63 5f 63 68 61 6e 67 | 65 64 20 3d 20 54 52 55 |rc_chang|ed = TRU|
|00003550| 45 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 0d 09 09 |E;....br|eak;....|
|00003560| 64 65 66 61 75 6c 74 3a | 0d 09 09 09 62 72 65 61 |default:|....brea|
|00003570| 6b 3b 0d 09 7d 0d 7d 0d | 0d 2f 2a 20 48 61 6e 64 |k;..}.}.|./* Hand|
|00003580| 6c 65 20 61 20 53 63 72 | 6f 6c 6c 42 61 72 20 62 |le a Scr|ollBar b|
|00003590| 65 69 6e 67 20 70 72 65 | 73 73 65 64 20 2a 2f 0d |eing pre|ssed */.|
|000035a0| 0d 2f 2a 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |./* ====|========|
|000035b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000035c0| 3d 3d 3d 3d 3d 20 2a 2f | 0d 0d 2f 2a 20 4f 70 65 |===== */|../* Ope|
|000035d0| 6e 20 6f 75 72 20 77 69 | 6e 64 6f 77 20 61 6e 64 |n our wi|ndow and|
|000035e0| 20 64 72 61 77 20 65 76 | 65 72 79 74 68 69 6e 67 | draw ev|erything|
|000035f0| 20 2a 2f 0d 76 6f 69 64 | 20 4f 70 65 6e 5f 70 72 | */.void| Open_pr|
|00003600| 6f 74 6f 6e 20 28 29 0d | 7b 0d 09 52 65 63 74 20 |oton ().|{..Rect |
|00003610| 74 65 6d 70 52 65 63 74 | 3b 0d 0d 09 69 66 20 28 |tempRect|;...if (|
|00003620| 70 72 6f 74 6f 6e 5f 57 | 69 6e 64 6f 77 20 3d 3d |proton_W|indow ==|
|00003630| 20 4e 49 4c 29 09 2f 2a | 20 48 61 6e 64 6c 65 20 | NIL)./*| Handle |
|00003640| 61 6e 20 6f 70 65 6e 20 | 77 68 65 6e 20 61 6c 72 |an open |when alr|
|00003650| 65 61 64 79 20 6f 70 65 | 6e 65 64 20 2a 2f 0d 09 |eady ope|ned */..|
|00003660| 7b 0d 09 09 2f 2a 20 70 | 72 6f 74 6f 6e 5f 57 69 |{.../* p|roton_Wi|
|00003670| 6e 64 6f 77 20 3d 20 28 | 57 69 6e 64 6f 77 50 74 |ndow = (|WindowPt|
|00003680| 72 29 20 47 65 74 4e 65 | 77 43 57 69 6e 64 6f 77 |r) GetNe|wCWindow|
|00003690| 20 28 38 2c 20 4e 49 4c | 2c 20 28 57 69 6e 64 6f | (8, NIL|, (Windo|
|000036a0| 77 50 74 72 29 20 2d 20 | 31 29 3b 20 2d 2d 20 20 |wPtr) - |1); -- |
|000036b0| 47 65 74 20 74 68 65 20 | 77 2a 2f 0d 0d 09 09 74 |Get the |w*/....t|
|000036c0| 65 6d 70 52 65 63 74 2e | 74 6f 70 20 3d 20 31 33 |empRect.|top = 13|
|000036d0| 39 3b 0d 09 09 74 65 6d | 70 52 65 63 74 2e 62 6f |9;...tem|pRect.bo|
|000036e0| 74 74 6f 6d 20 3d 20 33 | 33 34 3b 0d 09 09 74 65 |ttom = 3|34;...te|
|000036f0| 6d 70 52 65 63 74 2e 6c | 65 66 74 20 3d 20 33 3b |mpRect.l|eft = 3;|
|00003700| 0d 09 09 74 65 6d 70 52 | 65 63 74 2e 72 69 67 68 |...tempR|ect.righ|
|00003710| 74 20 3d 20 31 39 34 3b | 0d 09 09 70 72 6f 74 6f |t = 194;|...proto|
|00003720| 6e 5f 57 69 6e 64 6f 77 | 20 3d 20 28 57 69 6e 64 |n_Window| = (Wind|
|00003730| 6f 77 50 74 72 29 20 4e | 65 77 43 57 69 6e 64 6f |owPtr) N|ewCWindo|
|00003740| 77 28 20 28 50 74 72 29 | 20 4e 49 4c 2c 20 26 74 |w( (Ptr)| NIL, &t|
|00003750| 65 6d 70 52 65 63 74 2c | 20 22 5c 70 50 72 6f 74 |empRect,| "\pProt|
|00003760| 6f 6e 22 2c 20 0d 09 09 | 09 28 42 6f 6f 6c 65 61 |on", ...|.(Boolea|
|00003770| 6e 29 20 74 72 75 65 2c | 20 38 2c 20 28 57 69 6e |n) true,| 8, (Win|
|00003780| 64 6f 77 50 74 72 29 2d | 31 2c 20 28 42 6f 6f 6c |dowPtr)-|1, (Bool|
|00003790| 65 61 6e 29 66 61 6c 73 | 65 2c 20 38 4c 29 3b 0d |ean)fals|e, 8L);.|
|000037a0| 0d 09 09 2f 2a 20 4d 6f | 76 65 57 69 6e 64 6f 77 |.../* Mo|veWindow|
|000037b0| 20 28 70 72 6f 74 6f 6e | 5f 57 69 6e 64 6f 77 2c | (proton|_Window,|
|000037c0| 20 74 65 6d 70 52 65 63 | 74 2e 6c 65 66 74 2c 20 | tempRec|t.left, |
|000037d0| 74 65 6d 70 52 65 63 74 | 2e 74 6f 70 2c 20 54 52 |tempRect|.top, TR|
|000037e0| 55 45 29 3b 20 2a 2f 0d | 0d 09 09 53 65 74 50 6f |UE); */.|...SetPo|
|000037f0| 72 74 20 28 70 72 6f 74 | 6f 6e 5f 57 69 6e 64 6f |rt (prot|on_Windo|
|00003800| 77 29 3b 0d 0d 09 09 2f | 2a 20 20 4d 61 6b 65 20 |w);..../|* Make |
|00003810| 61 20 73 63 72 6f 6c 6c | 20 62 61 72 2c 20 56 65 |a scroll| bar, Ve|
|00003820| 72 74 20 53 63 72 6f 6c | 6c 20 62 61 72 20 20 20 |rt Scrol|l bar |
|00003830| 2a 2f 0d 09 09 53 63 72 | 6f 6c 6c 56 48 61 6e 64 |*/...Scr|ollVHand|
|00003840| 6c 65 20 3d 20 47 65 74 | 4e 65 77 43 6f 6e 74 72 |le = Get|NewContr|
|00003850| 6f 6c 20 28 49 5f 56 65 | 72 74 5f 53 63 72 6f 6c |ol (I_Ve|rt_Scrol|
|00003860| 6c 5f 62 61 72 2c 20 70 | 72 6f 74 6f 6e 5f 57 69 |l_bar, p|roton_Wi|
|00003870| 6e 64 6f 77 29 3b 0d 0d | 09 09 2f 2a 20 20 4d 61 |ndow);..|../* Ma|
|00003880| 6b 65 20 61 20 73 63 72 | 6f 6c 6c 20 62 61 72 2c |ke a scr|oll bar,|
|00003890| 20 48 6f 72 69 7a 20 53 | 63 72 6f 6c 6c 20 62 61 | Horiz S|croll ba|
|000038a0| 72 20 20 20 2a 2f 0d 0d | 09 09 53 63 72 6f 6c 6c |r */..|..Scroll|
|000038b0| 48 48 61 6e 64 6c 65 20 | 3d 20 47 65 74 4e 65 77 |HHandle |= GetNew|
|000038c0| 43 6f 6e 74 72 6f 6c 20 | 28 49 5f 48 6f 72 69 7a |Control |(I_Horiz|
|000038d0| 5f 53 63 72 6f 6c 6c 5f | 62 61 72 2c 20 70 72 6f |_Scroll_|bar, pro|
|000038e0| 74 6f 6e 5f 57 69 6e 64 | 6f 77 29 3b 0d 0d 09 09 |ton_Wind|ow);....|
|000038f0| 53 68 6f 77 57 69 6e 64 | 6f 77 20 28 70 72 6f 74 |ShowWind|ow (prot|
|00003900| 6f 6e 5f 57 69 6e 64 6f | 77 29 3b 0d 09 09 53 65 |on_Windo|w);...Se|
|00003910| 6c 65 63 74 57 69 6e 64 | 6f 77 20 28 70 72 6f 74 |lectWind|ow (prot|
|00003920| 6f 6e 5f 57 69 6e 64 6f | 77 29 3b 0d 0d 09 09 2f |on_Windo|w);..../|
|00003930| 2a 20 4e 53 65 74 50 61 | 6c 65 74 74 65 28 20 70 |* NSetPa|lette( p|
|00003940| 72 6f 74 6f 6e 5f 57 69 | 6e 64 6f 77 2c 20 6d 79 |roton_Wi|ndow, my|
|00003950| 70 61 6c 65 74 74 65 2c | 20 70 6d 46 67 55 70 64 |palette,| pmFgUpd|
|00003960| 61 74 65 73 29 3b 20 2a | 2f 0d 09 09 2f 2a 20 52 |ates); *|/.../* R|
|00003970| 47 42 42 61 63 6b 43 6f | 6c 6f 72 28 26 77 68 69 |GBBackCo|lor(&whi|
|00003980| 74 65 52 47 42 29 3b 20 | 2a 2f 0d 09 09 2f 2a 20 |teRGB); |*/.../* |
|00003990| 52 47 42 46 6f 72 65 43 | 6f 6c 6f 72 28 26 42 6c |RGBForeC|olor(&Bl|
|000039a0| 61 63 6b 52 47 42 29 3b | 20 2f 2a 20 63 6f 70 79 |ackRGB);| /* copy|
|000039b0| 62 69 74 73 20 75 73 75 | 61 6c 6c 79 20 65 78 70 |bits usu|ally exp|
|000039c0| 65 63 74 20 62 6c 61 63 | 6b 20 66 6f 72 65 20 61 |ect blac|k fore a|
|000039d0| 6e 64 20 77 68 69 74 65 | 20 62 61 63 6b 20 2a 2f |nd white| back */|
|000039e0| 0d 09 09 2f 2a 20 4f 70 | 43 6f 6c 6f 72 28 26 67 |.../* Op|Color(&g|
|000039f0| 72 61 79 52 47 42 29 3b | 20 2a 2f 0d 0d 09 09 52 |rayRGB);| */....R|
|00003a00| 65 73 69 7a 65 64 5f 70 | 72 6f 74 6f 6e 20 28 70 |esized_p|roton (p|
|00003a10| 72 6f 74 6f 6e 5f 57 69 | 6e 64 6f 77 29 3b 0d 09 |roton_Wi|ndow);..|
|00003a20| 7d 09 09 09 09 09 2f 2a | 20 45 6e 64 20 66 6f 72 |}...../*| End for|
|00003a30| 20 69 66 20 28 70 72 6f | 74 6f 6e 5f 57 69 6e 64 | if (pro|ton_Wind|
|00003a40| 6f 77 3c 3e 6e 69 6c 29 | 20 2a 2f 0d 09 65 6c 73 |ow<>nil)| */..els|
|00003a50| 65 0d 09 7b 0d 09 09 53 | 65 6c 65 63 74 57 69 6e |e..{...S|electWin|
|00003a60| 64 6f 77 20 28 70 72 6f | 74 6f 6e 5f 57 69 6e 64 |dow (pro|ton_Wind|
|00003a70| 6f 77 29 3b 09 2f 2a 20 | 41 6c 72 65 61 64 79 20 |ow);./* |Already |
|00003a80| 6f 70 65 6e 2c 20 73 6f | 20 73 68 6f 77 20 69 74 |open, so| show it|
|00003a90| 20 2a 2f 0d 09 7d 0d 7d | 0d 0d 2f 2a 20 45 6e 64 | */..}.}|../* End|
|00003aa0| 20 6f 66 20 6f 70 65 6e | 20 66 75 6e 63 74 69 6f | of open| functio|
|00003ab0| 6e 20 2a 2f 0d 0d 2f 2a | 20 3d 3d 3d 3d 3d 3d 3d |n */../*| =======|
|00003ac0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003ad0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 20 2a 2f 0d 0d 2f |========|== */../|
|00003ae0| 2a 20 48 61 6e 64 6c 65 | 20 61 63 74 69 6f 6e 20 |* Handle| action |
|00003af0| 74 6f 20 6f 75 72 20 77 | 69 6e 64 6f 77 2c 20 6c |to our w|indow, l|
|00003b00| 69 6b 65 20 63 6f 6e 74 | 72 6f 6c 73 20 2a 2f 0d |ike cont|rols */.|
|00003b10| 76 6f 69 64 20 44 6f 5f | 70 72 6f 74 6f 6e 20 28 |void Do_|proton (|
|00003b20| 6d 79 45 76 65 6e 74 29 | 0d 09 45 76 65 6e 74 52 |myEvent)|..EventR|
|00003b30| 65 63 6f 72 64 20 2a 6d | 79 45 76 65 6e 74 3b 0d |ecord *m|yEvent;.|
|00003b40| 7b 0d 09 73 68 6f 72 74 | 20 52 65 66 43 6f 6e 3b |{..short| RefCon;|
|00003b50| 09 09 09 2f 2a 20 52 65 | 66 43 6f 6e 20 66 6f 72 |.../* Re|fCon for|
|00003b60| 20 63 6f 6e 74 72 6f 6c | 73 20 2a 2f 0d 09 73 68 | control|s */..sh|
|00003b70| 6f 72 74 20 63 6f 64 65 | 3b 09 09 09 09 2f 2a 20 |ort code|;..../* |
|00003b80| 4c 6f 63 61 74 69 6f 6e | 20 6f 66 20 65 76 65 6e |Location| of even|
|00003b90| 74 20 69 6e 20 77 69 6e | 64 6f 77 20 6f 72 20 63 |t in win|dow or c|
|00003ba0| 6f 6e 74 72 6f 6c 73 20 | 2a 2f 0d 09 73 68 6f 72 |ontrols |*/..shor|
|00003bb0| 74 20 74 68 65 56 61 6c | 75 65 3b 09 09 09 2f 2a |t theVal|ue;.../*|
|00003bc0| 20 43 75 72 72 65 6e 74 | 20 76 61 6c 75 65 20 6f | Current| value o|
|00003bd0| 66 20 61 20 63 6f 6e 74 | 72 6f 6c 20 2a 2f 0d 09 |f a cont|rol */..|
|00003be0| 57 69 6e 64 6f 77 50 74 | 72 20 77 68 69 63 68 57 |WindowPt|r whichW|
|00003bf0| 69 6e 64 6f 77 3b 09 2f | 2a 20 57 69 6e 64 6f 77 |indow;./|* Window|
|00003c00| 20 70 6f 69 6e 74 65 72 | 20 77 68 65 72 65 20 65 | pointer| where e|
|00003c10| 76 65 6e 74 20 68 61 70 | 70 65 6e 65 64 20 2a 2f |vent hap|pened */|
|00003c20| 0d 09 50 6f 69 6e 74 20 | 6d 79 50 74 3b 09 09 09 |..Point |myPt;...|
|00003c30| 09 2f 2a 20 50 6f 69 6e | 74 20 77 68 65 72 65 20 |./* Poin|t where |
|00003c40| 65 76 65 6e 74 20 68 61 | 70 70 65 6e 65 64 20 2a |event ha|ppened *|
|00003c50| 2f 0d 09 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |/..Contr|olHandle|
|00003c60| 20 74 68 65 43 6f 6e 74 | 72 6f 6c 3b 09 2f 2a 20 | theCont|rol;./* |
|00003c70| 48 61 6e 64 6c 65 20 66 | 6f 72 20 61 20 63 6f 6e |Handle f|or a con|
|00003c80| 74 72 6f 6c 20 2a 2f 0d | 09 57 69 6e 64 6f 77 50 |trol */.|.WindowP|
|00003c90| 74 72 20 53 61 76 65 50 | 6f 72 74 3b 0d 09 0d 09 |tr SaveP|ort;....|
|00003ca0| 2f 2a 20 53 74 61 72 74 | 20 6f 66 20 57 69 6e 64 |/* Start| of Wind|
|00003cb0| 6f 77 20 68 61 6e 64 6c | 65 72 20 2a 2f 0d 09 69 |ow handl|er */..i|
|00003cc0| 66 20 28 70 72 6f 74 6f | 6e 5f 57 69 6e 64 6f 77 |f (proto|n_Window|
|00003cd0| 20 21 3d 20 4e 49 4c 29 | 09 2f 2a 20 48 61 6e 64 | != NIL)|./* Hand|
|00003ce0| 6c 65 20 6f 6e 6c 79 20 | 77 68 65 6e 20 74 68 65 |le only |when the|
|00003cf0| 20 77 69 6e 64 6f 77 20 | 69 73 20 76 61 6c 69 64 | window |is valid|
|00003d00| 20 2a 2f 0d 09 7b 0d 09 | 09 47 65 74 50 6f 72 74 | */..{..|.GetPort|
|00003d10| 20 28 26 53 61 76 65 50 | 6f 72 74 29 3b 0d 09 09 | (&SaveP|ort);...|
|00003d20| 53 65 74 50 6f 72 74 28 | 70 72 6f 74 6f 6e 5f 57 |SetPort(|proton_W|
|00003d30| 69 6e 64 6f 77 29 3b 0d | 09 09 0d 09 09 53 65 74 |indow);.|.....Set|
|00003d40| 4f 72 69 67 69 6e 28 30 | 2c 20 30 29 3b 0d 09 09 |Origin(0|, 0);...|
|00003d50| 0d 09 09 63 6f 64 65 20 | 3d 20 46 69 6e 64 57 69 |...code |= FindWi|
|00003d60| 6e 64 6f 77 20 28 6d 79 | 45 76 65 6e 74 2d 3e 77 |ndow (my|Event->w|
|00003d70| 68 65 72 65 2c 20 26 77 | 68 69 63 68 57 69 6e 64 |here, &w|hichWind|
|00003d80| 6f 77 29 3b 09 2f 2a 20 | 47 65 74 20 77 68 65 72 |ow);./* |Get wher|
|00003d90| 65 2a 2f 0d 0d 09 09 69 | 66 20 28 28 6d 79 45 76 |e*/....i|f ((myEv|
|00003da0| 65 6e 74 2d 3e 77 68 61 | 74 20 3d 3d 20 6d 6f 75 |ent->wha|t == mou|
|00003db0| 73 65 44 6f 77 6e 29 20 | 26 26 20 28 70 72 6f 74 |seDown) |&& (prot|
|00003dc0| 6f 6e 5f 57 69 6e 64 6f | 77 20 3d 3d 20 77 68 69 |on_Windo|w == whi|
|00003dd0| 63 68 57 69 6e 64 6f 77 | 29 29 0d 09 09 7b 0d 09 |chWindow|))...{..|
|00003de0| 09 09 6d 79 50 74 20 3d | 20 6d 79 45 76 65 6e 74 |..myPt =| myEvent|
|00003df0| 2d 3e 77 68 65 72 65 3b | 09 2f 2a 20 47 65 74 20 |->where;|./* Get |
|00003e00| 6d 6f 75 73 65 20 70 6f | 73 69 74 69 6f 6e 20 2a |mouse po|sition *|
|00003e10| 2f 09 09 0d 09 09 09 47 | 6c 6f 62 61 6c 54 6f 4c |/......G|lobalToL|
|00003e20| 6f 63 61 6c 20 28 26 6d | 79 50 74 29 3b 09 2f 2a |ocal (&m|yPt);./*|
|00003e30| 20 4d 61 6b 65 20 69 74 | 20 72 65 6c 61 74 69 76 | Make it| relativ|
|00003e40| 65 20 2a 2f 0d 09 09 7d | 0d 0d 09 09 69 66 20 28 |e */...}|....if (|
|00003e50| 28 70 72 6f 74 6f 6e 5f | 57 69 6e 64 6f 77 20 3d |(proton_|Window =|
|00003e60| 3d 20 77 68 69 63 68 57 | 69 6e 64 6f 77 29 20 26 |= whichW|indow) &|
|00003e70| 26 20 28 63 6f 64 65 20 | 3d 3d 20 69 6e 43 6f 6e |& (code |== inCon|
|00003e80| 74 65 6e 74 29 29 09 2f | 2a 20 66 6f 72 20 6f 2a |tent))./|* for o*|
|00003e90| 2f 0d 09 09 7b 0d 0d 09 | 09 09 63 6f 64 65 20 3d |/...{...|..code =|
|00003ea0| 20 46 69 6e 64 43 6f 6e | 74 72 6f 6c 20 28 6d 79 | FindCon|trol (my|
|00003eb0| 50 74 2c 20 77 68 69 63 | 68 57 69 6e 64 6f 77 2c |Pt, whic|hWindow,|
|00003ec0| 20 26 74 68 65 43 6f 6e | 74 72 6f 6c 29 3b 09 2f | &theCon|trol);./|
|00003ed0| 2a 20 47 2a 2f 0d 0d 09 | 09 09 69 66 20 28 28 63 |* G*/...|..if ((c|
|00003ee0| 6f 64 65 20 3d 3d 20 69 | 6e 55 70 42 75 74 74 6f |ode == i|nUpButto|
|00003ef0| 6e 29 20 7c 7c 20 28 63 | 6f 64 65 20 3d 3d 20 69 |n) || (c|ode == i|
|00003f00| 6e 44 6f 77 6e 42 75 74 | 74 6f 6e 29 0d 09 09 09 |nDownBut|ton)....|
|00003f10| 09 7c 7c 20 28 63 6f 64 | 65 20 3d 3d 20 69 6e 54 |.|| (cod|e == inT|
|00003f20| 68 75 6d 62 29 20 7c 7c | 20 28 63 6f 64 65 20 3d |humb) ||| (code =|
|00003f30| 3d 20 69 6e 50 61 67 65 | 44 6f 77 6e 29 0d 09 09 |= inPage|Down)...|
|00003f40| 09 09 7c 7c 20 28 63 6f | 64 65 20 3d 3d 20 69 6e |..|| (co|de == in|
|00003f50| 50 61 67 65 55 70 29 29 | 0d 09 09 09 09 44 6f 5f |PageUp))|.....Do_|
|00003f60| 41 5f 53 63 72 6f 6c 6c | 42 61 72 20 28 63 6f 64 |A_Scroll|Bar (cod|
|00003f70| 65 2c 20 74 68 65 43 6f | 6e 74 72 6f 6c 2c 20 6d |e, theCo|ntrol, m|
|00003f80| 79 50 74 29 3b 09 2f 2a | 20 44 6f 20 73 63 72 6f |yPt);./*| Do scro|
|00003f90| 6c 6c 2a 2f 0d 09 09 09 | 69 66 20 28 63 6f 64 65 |ll*/....|if (code|
|00003fa0| 20 21 3d 20 30 29 09 2f | 2a 20 43 68 65 63 6b 20 | != 0)./|* Check |
|00003fb0| 74 79 70 65 20 6f 66 20 | 63 6f 6e 74 72 6f 6c 20 |type of |control |
|00003fc0| 2a 2f 0d 09 09 09 09 63 | 6f 64 65 20 3d 20 54 72 |*/.....c|ode = Tr|
|00003fd0| 61 63 6b 43 6f 6e 74 72 | 6f 6c 20 28 74 68 65 43 |ackContr|ol (theC|
|00003fe0| 6f 6e 74 72 6f 6c 2c 20 | 6d 79 50 74 2c 20 4e 49 |ontrol, |myPt, NI|
|00003ff0| 4c 29 3b 09 2f 2a 20 54 | 72 61 63 6b 2a 2f 0d 0d |L);./* T|rack*/..|
|00004000| 09 09 7d 09 09 09 09 2f | 2a 20 45 6e 64 20 66 6f |..}..../|* End fo|
|00004010| 72 20 69 66 20 28 70 72 | 6f 74 6f 6e 5f 57 69 6e |r if (pr|oton_Win|
|00004020| 64 6f 77 3d 3d 77 68 69 | 63 68 57 69 6e 64 6f 77 |dow==whi|chWindow|
|00004030| 29 20 2a 2f 0d 09 7d 09 | 09 09 09 09 2f 2a 20 45 |) */..}.|..../* E|
|00004040| 6e 64 20 66 6f 72 20 69 | 66 20 28 70 72 6f 74 6f |nd for i|f (proto|
|00004050| 6e 5f 57 69 6e 64 6f 77 | 20 21 3d 20 4e 49 4c 29 |n_Window| != NIL)|
|00004060| 20 2a 2f 0d 09 53 65 74 | 50 6f 72 74 28 53 61 76 | */..Set|Port(Sav|
|00004070| 65 50 6f 72 74 29 3b 0d | 7d 0d 0d 2f 2a 20 45 6e |ePort);.|}../* En|
|00004080| 64 20 6f 66 20 66 75 6e | 63 74 69 6f 6e 20 2a 2f |d of fun|ction */|
|00004090| 0d 0d 2f 2a 20 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |../* ===|========|
|000040a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000040b0| 3d 3d 3d 3d 3d 3d 20 2a | 2f 0d 0d 76 6f 69 64 20 |====== *|/..void |
|000040c0| 72 65 61 64 5f 70 72 6f | 74 6f 6e 28 29 0d 2f 2a |read_pro|ton()./*|
|000040d0| 20 72 65 61 64 73 20 61 | 20 50 49 43 54 20 66 69 | reads a| PICT fi|
|000040e0| 6c 65 20 61 6e 64 20 64 | 69 73 70 6c 61 79 73 20 |le and d|isplays |
|000040f0| 69 74 20 69 6e 20 70 72 | 6f 74 6f 6e 20 77 69 6e |it in pr|oton win|
|00004100| 64 6f 77 20 2a 2f 0d 7b | 0d 09 73 68 6f 72 74 20 |dow */.{|..short |
|00004110| 77 69 64 74 68 2c 20 68 | 65 69 67 68 74 3b 0d 2f |width, h|eight;./|
|00004120| 2a 0d 09 70 75 74 20 75 | 70 20 6f 70 65 6e 2d 66 |*..put u|p open-f|
|00004130| 69 6c 65 20 64 69 61 6c | 6f 67 0d 09 69 66 20 6e |ile dial|og..if n|
|00004140| 6f 74 20 63 61 6e 63 65 | 6c 6c 65 64 20 74 68 65 |ot cance|lled the|
|00004150| 6e 0d 09 09 63 6c 65 61 | 72 20 6f 75 74 20 63 75 |n...clea|r out cu|
|00004160| 72 72 65 6e 74 20 70 72 | 6f 74 6f 6e 20 70 69 63 |rrent pr|oton pic|
|00004170| 74 75 72 65 0d 09 09 6f | 70 65 6e 20 73 65 6c 65 |ture...o|pen sele|
|00004180| 63 74 65 64 20 66 69 6c | 65 0d 09 09 73 6b 69 70 |cted fil|e...skip|
|00004190| 20 68 65 61 64 65 72 20 | 35 31 32 20 62 79 74 65 | header |512 byte|
|000041a0| 73 0d 09 09 72 65 61 64 | 20 74 6f 20 66 69 6e 64 |s...read| to find|
|000041b0| 20 6f 75 74 20 68 6f 77 | 20 62 69 67 20 74 68 65 | out how| big the|
|000041c0| 20 70 69 63 74 75 72 65 | 20 69 73 20 67 6f 69 6e | picture| is goin|
|000041d0| 67 20 74 6f 20 62 65 2c | 20 61 6e 64 20 74 68 65 |g to be,| and the|
|000041e0| 6e 20 72 65 77 69 6e 64 | 20 61 20 62 69 74 0d 09 |n rewind| a bit..|
|000041f0| 09 61 6c 6c 6f 63 61 74 | 65 20 61 70 70 72 6f 70 |.allocat|e approp|
|00004200| 72 69 61 74 65 20 68 61 | 6e 64 6c 65 0d 09 09 72 |riate ha|ndle...r|
|00004210| 65 61 64 20 66 69 6c 65 | 20 69 6e 74 6f 20 74 68 |ead file| into th|
|00004220| 65 20 68 61 6e 64 6c 65 | 0d 09 09 75 73 65 20 74 |e handle|...use t|
|00004230| 68 65 20 70 69 63 74 20 | 46 72 61 6d 65 20 69 6e |he pict |Frame in|
|00004240| 20 64 65 74 65 72 6d 69 | 6e 69 6e 67 20 68 6f 77 | determi|ning how|
|00004250| 20 62 69 67 20 74 6f 20 | 63 72 65 61 74 65 20 74 | big to |create t|
|00004260| 68 65 20 70 69 78 6d 61 | 70 20 66 6f 72 20 73 6f |he pixma|p for so|
|00004270| 75 72 63 65 31 0d 09 09 | 63 72 65 61 74 65 20 70 |urce1...|create p|
|00004280| 69 78 6d 61 70 0d 09 09 | 63 6f 70 79 20 74 68 65 |ixmap...|copy the|
|00004290| 20 50 49 43 54 20 69 6e | 74 6f 20 74 68 65 20 70 | PICT in|to the p|
|000042a0| 69 78 6d 61 70 0d 09 65 | 6e 64 20 69 66 0d 2a 2f |ixmap..e|nd if.*/|
|000042b0| 0d 09 47 44 48 61 6e 64 | 6c 65 20 74 68 65 4d 61 |..GDHand|le theMa|
|000042c0| 78 44 65 76 69 63 65 3b | 0d 09 50 6f 69 6e 74 20 |xDevice;|..Point |
|000042d0| 70 6c 61 63 65 3b 0d 09 | 50 6f 69 6e 74 20 74 65 |place;..|Point te|
|000042e0| 6d 70 50 3b 0d 09 52 65 | 63 74 20 67 6c 6f 62 52 |mpP;..Re|ct globR|
|000042f0| 65 63 74 3b 0d 09 53 46 | 52 65 70 6c 79 20 74 68 |ect;..SF|Reply th|
|00004300| 65 52 65 70 6c 79 3b 0d | 09 53 46 54 79 70 65 4c |eReply;.|.SFTypeL|
|00004310| 69 73 74 20 74 68 65 4c | 69 73 74 3b 0d 09 73 68 |ist theL|ist;..sh|
|00004320| 6f 72 74 20 69 78 2c 20 | 69 79 3b 0d 0d 09 70 6c |ort ix, |iy;...pl|
|00004330| 61 63 65 2e 68 20 3d 20 | 36 30 3b 0d 09 70 6c 61 |ace.h = |60;..pla|
|00004340| 63 65 2e 76 20 3d 20 36 | 30 3b 0d 09 74 68 65 4c |ce.v = 6|0;..theL|
|00004350| 69 73 74 5b 30 5d 20 3d | 20 27 50 49 43 54 27 3b |ist[0] =| 'PICT';|
|00004360| 0d 0d 09 53 46 47 65 74 | 46 69 6c 65 20 28 20 70 |...SFGet|File ( p|
|00004370| 6c 61 63 65 2c 20 22 5c | 70 4f 70 65 6e 20 61 20 |lace, "\|pOpen a |
|00004380| 47 72 61 79 53 63 61 6c | 65 20 50 49 43 54 20 66 |GrayScal|e PICT f|
|00004390| 69 6c 65 22 2c 20 4e 49 | 4c 2c 20 31 2c 20 74 68 |ile", NI|L, 1, th|
|000043a0| 65 4c 69 73 74 2c 20 4e | 49 4c 2c 20 26 74 68 65 |eList, N|IL, &the|
|000043b0| 52 65 70 6c 79 20 29 3b | 0d 0d 09 53 65 74 50 6f |Reply );|...SetPo|
|000043c0| 72 74 28 20 70 72 6f 74 | 6f 6e 5f 57 69 6e 64 6f |rt( prot|on_Windo|
|000043d0| 77 20 29 3b 0d 0d 09 69 | 66 20 28 20 74 68 65 52 |w );...i|f ( theR|
|000043e0| 65 70 6c 79 2e 67 6f 6f | 64 20 21 3d 20 30 20 29 |eply.goo|d != 0 )|
|000043f0| 0d 09 7b 0d 09 09 69 66 | 20 28 20 70 72 6f 74 6f |..{...if| ( proto|
|00004400| 6e 5f 70 69 63 20 21 3d | 20 4e 49 4c 20 29 0d 09 |n_pic !=| NIL )..|
|00004410| 09 7b 0d 09 09 09 44 69 | 73 70 6f 73 48 61 6e 64 |.{....Di|sposHand|
|00004420| 6c 65 28 20 28 48 61 6e | 64 6c 65 29 20 70 72 6f |le( (Han|dle) pro|
|00004430| 74 6f 6e 5f 70 69 63 20 | 29 3b 0d 09 09 7d 0d 09 |ton_pic |);...}..|
|00004440| 09 69 66 20 28 20 47 65 | 74 50 69 63 28 20 74 68 |.if ( Ge|tPic( th|
|00004450| 65 52 65 70 6c 79 2c 20 | 26 70 72 6f 74 6f 6e 5f |eReply, |&proton_|
|00004460| 70 69 63 20 29 20 29 0d | 09 09 7b 0d 09 09 09 70 |pic ) ).|..{....p|
|00004470| 72 6f 74 6f 6e 5f 72 65 | 63 74 20 3d 20 28 2a 2a |roton_re|ct = (**|
|00004480| 70 72 6f 74 6f 6e 5f 70 | 69 63 29 2e 70 69 63 46 |proton_p|ic).picF|
|00004490| 72 61 6d 65 3b 0d 09 09 | 09 2f 2a 20 63 6f 70 79 |rame;...|./* copy|
|000044a0| 20 74 68 61 74 20 50 49 | 43 54 20 74 6f 20 6f 75 | that PI|CT to ou|
|000044b0| 72 20 70 69 78 6d 61 70 | 2c 20 63 6f 6e 76 65 72 |r pixmap|, conver|
|000044c0| 74 69 6e 67 20 69 74 20 | 74 6f 20 75 73 65 20 74 |ting it |to use t|
|000044d0| 68 65 20 46 6c 6f 75 72 | 69 6e 65 20 63 6f 6c 6f |he Flour|ine colo|
|000044e0| 72 73 20 2a 2f 0d 09 09 | 09 0d 09 09 09 68 65 69 |rs */...|.....hei|
|000044f0| 67 68 74 20 3d 20 70 72 | 6f 74 6f 6e 5f 72 65 63 |ght = pr|oton_rec|
|00004500| 74 2e 62 6f 74 74 6f 6d | 20 2d 20 70 72 6f 74 6f |t.bottom| - proto|
|00004510| 6e 5f 72 65 63 74 2e 74 | 6f 70 3b 0d 09 09 09 77 |n_rect.t|op;....w|
|00004520| 69 64 74 68 20 3d 20 70 | 72 6f 74 6f 6e 5f 72 65 |idth = p|roton_re|
|00004530| 63 74 2e 72 69 67 68 74 | 20 2d 20 70 72 6f 74 6f |ct.right| - proto|
|00004540| 6e 5f 72 65 63 74 2e 6c | 65 66 74 3b 0d 09 09 09 |n_rect.l|eft;....|
|00004550| 70 72 6f 74 6f 6e 5f 72 | 65 63 74 2e 74 6f 70 20 |proton_r|ect.top |
|00004560| 3d 20 30 3b 0d 09 09 09 | 70 72 6f 74 6f 6e 5f 72 |= 0;....|proton_r|
|00004570| 65 63 74 2e 62 6f 74 74 | 6f 6d 20 3d 20 68 65 69 |ect.bott|om = hei|
|00004580| 67 68 74 3b 0d 09 09 09 | 70 72 6f 74 6f 6e 5f 72 |ght;....|proton_r|
|00004590| 65 63 74 2e 6c 65 66 74 | 20 3d 20 30 3b 0d 09 09 |ect.left| = 0;...|
|000045a0| 09 70 72 6f 74 6f 6e 5f | 72 65 63 74 2e 72 69 67 |.proton_|rect.rig|
|000045b0| 68 74 20 3d 20 77 69 64 | 74 68 3b 0d 0d 09 09 09 |ht = wid|th;.....|
|000045c0| 74 65 6d 70 50 2e 76 20 | 3d 20 70 72 6f 74 6f 6e |tempP.v |= proton|
|000045d0| 5f 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |_Window-|>portRec|
|000045e0| 74 2e 74 6f 70 3b 0d 09 | 09 09 74 65 6d 70 50 2e |t.top;..|..tempP.|
|000045f0| 68 20 3d 20 70 72 6f 74 | 6f 6e 5f 57 69 6e 64 6f |h = prot|on_Windo|
|00004600| 77 2d 3e 70 6f 72 74 52 | 65 63 74 2e 6c 65 66 74 |w->portR|ect.left|
|00004610| 3b 0d 09 09 09 4c 6f 63 | 61 6c 54 6f 47 6c 6f 62 |;....Loc|alToGlob|
|00004620| 61 6c 28 26 74 65 6d 70 | 50 29 3b 0d 09 09 09 67 |al(&temp|P);....g|
|00004630| 6c 6f 62 52 65 63 74 2e | 74 6f 70 20 3d 20 74 65 |lobRect.|top = te|
|00004640| 6d 70 50 2e 76 3b 0d 09 | 09 09 67 6c 6f 62 52 65 |mpP.v;..|..globRe|
|00004650| 63 74 2e 6c 65 66 74 20 | 3d 20 74 65 6d 70 50 2e |ct.left |= tempP.|
|00004660| 68 3b 0d 0d 09 09 09 74 | 65 6d 70 50 2e 76 20 3d |h;.....t|empP.v =|
|00004670| 20 70 72 6f 74 6f 6e 5f | 57 69 6e 64 6f 77 2d 3e | proton_|Window->|
|00004680| 70 6f 72 74 52 65 63 74 | 2e 62 6f 74 74 6f 6d 3b |portRect|.bottom;|
|00004690| 0d 09 09 09 74 65 6d 70 | 50 2e 68 20 3d 20 70 72 |....temp|P.h = pr|
|000046a0| 6f 74 6f 6e 5f 57 69 6e | 64 6f 77 2d 3e 70 6f 72 |oton_Win|dow->por|
|000046b0| 74 52 65 63 74 2e 72 69 | 67 68 74 3b 0d 09 09 09 |tRect.ri|ght;....|
|000046c0| 4c 6f 63 61 6c 54 6f 47 | 6c 6f 62 61 6c 28 26 74 |LocalToG|lobal(&t|
|000046d0| 65 6d 70 50 29 3b 20 0d | 09 09 09 67 6c 6f 62 52 |empP); .|...globR|
|000046e0| 65 63 74 2e 62 6f 74 74 | 6f 6d 20 3d 20 74 65 6d |ect.bott|om = tem|
|000046f0| 70 50 2e 76 3b 0d 09 09 | 09 67 6c 6f 62 52 65 63 |pP.v;...|.globRec|
|00004700| 74 2e 72 69 67 68 74 20 | 3d 20 74 65 6d 70 50 2e |t.right |= tempP.|
|00004710| 68 3b 0d 0d 09 09 09 74 | 68 65 4d 61 78 44 65 76 |h;.....t|heMaxDev|
|00004720| 69 63 65 20 3d 20 47 65 | 74 4d 61 78 44 65 76 69 |ice = Ge|tMaxDevi|
|00004730| 63 65 28 26 67 6c 6f 62 | 52 65 63 74 29 3b 20 2f |ce(&glob|Rect); /|
|00004740| 2a 67 65 74 20 74 68 65 | 20 6d 61 78 44 65 76 69 |*get the| maxDevi|
|00004750| 63 65 2a 2f 0d 0d 09 09 | 09 70 72 6f 74 6f 6e 5f |ce*/....|.proton_|
|00004760| 62 6d 61 70 20 3d 20 70 | 69 63 5f 74 6f 5f 62 6d |bmap = p|ic_to_bm|
|00004770| 61 70 28 20 70 72 6f 74 | 6f 6e 5f 70 69 63 2c 20 |ap( prot|on_pic, |
|00004780| 26 70 72 6f 74 6f 6e 5f | 72 65 63 74 2c 20 74 68 |&proton_|rect, th|
|00004790| 65 4d 61 78 44 65 76 69 | 63 65 20 29 3b 0d 0d 09 |eMaxDevi|ce );...|
|000047a0| 09 09 69 66 20 28 20 70 | 72 6f 74 6f 6e 5f 62 6d |..if ( p|roton_bm|
|000047b0| 61 70 20 21 3d 20 4e 49 | 4c 20 29 0d 09 09 09 7b |ap != NI|L )....{|
|000047c0| 0d 09 09 09 09 44 69 73 | 70 6f 73 48 61 6e 64 6c |.....Dis|posHandl|
|000047d0| 65 28 20 28 48 61 6e 64 | 6c 65 29 20 70 72 6f 74 |e( (Hand|le) prot|
|000047e0| 6f 6e 5f 70 69 63 20 29 | 3b 0d 09 09 09 7d 0d 09 |on_pic )|;....}..|
|000047f0| 09 09 73 72 63 5f 63 68 | 61 6e 67 65 64 20 3d 20 |..src_ch|anged = |
|00004800| 54 52 55 45 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |TRUE;...|}...else|
|00004810| 20 2f 2a 20 66 61 69 6c | 65 64 20 74 6f 20 67 65 | /* fail|ed to ge|
|00004820| 74 20 61 20 70 69 63 74 | 20 2a 2f 0d 09 09 7b 0d |t a pict| */...{.|
|00004830| 09 09 09 63 6c 65 61 72 | 5f 70 72 6f 74 6f 6e 28 |...clear|_proton(|
|00004840| 29 3b 0d 09 09 7d 0d 09 | 7d 0d 09 55 70 44 61 74 |);...}..|}..UpDat|
|00004850| 65 5f 70 72 6f 74 6f 6e | 20 28 70 72 6f 74 6f 6e |e_proton| (proton|
|00004860| 5f 57 69 6e 64 6f 77 29 | 3b 0d 7d 0d 0d 76 6f 69 |_Window)|;.}..voi|
|00004870| 64 20 70 61 73 74 65 5f | 70 72 6f 74 6f 6e 28 29 |d paste_|proton()|
|00004880| 20 2f 2a 20 21 21 21 20 | 63 68 61 6e 67 65 20 74 | /* !!! |change t|
|00004890| 68 69 73 20 74 6f 20 75 | 73 65 20 6f 66 66 20 73 |his to u|se off s|
|000048a0| 63 72 65 65 6e 20 62 69 | 74 6d 61 70 20 2a 2f 0d |creen bi|tmap */.|
|000048b0| 2f 2a 20 70 61 73 74 65 | 20 61 20 50 49 43 54 20 |/* paste| a PICT |
|000048c0| 66 72 6f 6d 20 74 68 65 | 20 63 6c 69 70 62 6f 61 |from the| clipboa|
|000048d0| 72 64 20 61 6e 64 20 64 | 69 73 70 6c 61 79 73 20 |rd and d|isplays |
|000048e0| 69 74 20 69 6e 20 70 72 | 6f 74 6f 6e 20 77 69 6e |it in pr|oton win|
|000048f0| 64 6f 77 20 2a 2f 0d 7b | 0d 09 6c 6f 6e 67 20 6c |dow */.{|..long l|
|00004900| 65 6e 67 74 68 2c 20 6f | 66 66 73 65 74 3b 0d 09 |ength, o|ffset;..|
|00004910| 6c 6f 6e 67 20 77 69 64 | 74 68 2c 20 68 65 69 67 |long wid|th, heig|
|00004920| 68 74 2c 20 73 69 7a 65 | 3b 0d 2f 2a 0d 09 6c 6f |ht, size|;./*..lo|
|00004930| 6f 6b 20 66 6f 72 20 50 | 49 43 54 20 72 65 73 6f |ok for P|ICT reso|
|00004940| 75 72 63 65 20 69 6e 20 | 63 6c 69 70 62 6f 61 72 |urce in |clipboar|
|00004950| 64 0d 09 69 66 20 74 68 | 65 72 65 20 69 73 20 61 |d..if th|ere is a|
|00004960| 20 50 49 43 54 20 74 68 | 65 6e 0d 09 09 63 6c 65 | PICT th|en...cle|
|00004970| 61 72 20 6f 75 74 20 63 | 75 72 72 65 6e 74 20 70 |ar out c|urrent p|
|00004980| 72 6f 74 6f 6e 20 70 69 | 63 74 75 72 65 0d 09 09 |roton pi|cture...|
|00004990| 72 65 61 64 20 74 6f 20 | 66 69 6e 64 20 6f 75 74 |read to |find out|
|000049a0| 20 68 6f 77 20 62 69 67 | 20 74 68 65 20 70 69 63 | how big| the pic|
|000049b0| 74 75 72 65 20 69 73 20 | 67 6f 69 6e 67 20 74 6f |ture is |going to|
|000049c0| 20 62 65 2c 20 61 6e 64 | 20 74 68 65 6e 20 72 65 | be, and| then re|
|000049d0| 77 69 6e 64 20 61 20 62 | 69 74 0d 09 09 61 6c 6c |wind a b|it...all|
|000049e0| 6f 63 61 74 65 20 61 70 | 70 72 6f 70 72 69 61 74 |ocate ap|propriat|
|000049f0| 65 20 68 61 6e 64 6c 65 | 0d 09 09 72 65 61 64 20 |e handle|...read |
|00004a00| 70 61 73 74 65 20 69 6e | 74 6f 20 74 68 65 20 68 |paste in|to the h|
|00004a10| 61 6e 64 6c 65 0d 09 09 | 75 73 65 20 74 68 65 20 |andle...|use the |
|00004a20| 70 69 63 74 20 46 72 61 | 6d 65 20 69 6e 20 64 65 |pict Fra|me in de|
|00004a30| 74 65 72 6d 69 6e 69 6e | 67 20 68 6f 77 20 62 69 |terminin|g how bi|
|00004a40| 67 20 74 6f 20 63 72 65 | 61 74 65 20 74 68 65 20 |g to cre|ate the |
|00004a50| 70 69 78 6d 61 70 20 66 | 6f 72 20 73 6f 75 72 63 |pixmap f|or sourc|
|00004a60| 65 31 0d 09 09 63 72 65 | 61 74 65 20 70 69 78 6d |e1...cre|ate pixm|
|00004a70| 61 70 0d 09 09 63 6f 70 | 79 20 74 68 65 20 50 49 |ap...cop|y the PI|
|00004a80| 43 54 20 69 6e 74 6f 20 | 74 68 65 20 70 69 78 6d |CT into |the pixm|
|00004a90| 61 70 0d 09 65 6e 64 20 | 69 66 0d 2a 2f 0d 09 70 |ap..end |if.*/..p|
|00004aa0| 72 6f 74 6f 6e 5f 70 69 | 63 20 3d 20 28 50 69 63 |roton_pi|c = (Pic|
|00004ab0| 48 61 6e 64 6c 65 29 20 | 4e 65 77 48 61 6e 64 6c |Handle) |NewHandl|
|00004ac0| 65 28 30 29 3b 0d 09 6c | 65 6e 67 74 68 20 3d 20 |e(0);..l|ength = |
|00004ad0| 47 65 74 53 63 72 61 70 | 28 20 28 48 61 6e 64 6c |GetScrap|( (Handl|
|00004ae0| 65 29 20 70 72 6f 74 6f | 6e 5f 70 69 63 2c 20 27 |e) proto|n_pic, '|
|00004af0| 50 49 43 54 27 2c 20 26 | 6f 66 66 73 65 74 29 3b |PICT', &|offset);|
|00004b00| 0d 09 69 66 20 28 20 6c | 65 6e 67 74 68 20 3e 20 |..if ( l|ength > |
|00004b10| 30 20 29 0d 09 7b 0d 09 | 09 70 72 6f 74 6f 6e 5f |0 )..{..|.proton_|
|00004b20| 72 65 63 74 20 3d 20 28 | 2a 2a 70 72 6f 74 6f 6e |rect = (|**proton|
|00004b30| 5f 70 69 63 29 2e 70 69 | 63 46 72 61 6d 65 3b 0d |_pic).pi|cFrame;.|
|00004b40| 09 09 77 69 64 74 68 20 | 3d 20 70 72 6f 74 6f 6e |..width |= proton|
|00004b50| 5f 72 65 63 74 2e 72 69 | 67 68 74 20 2d 20 70 72 |_rect.ri|ght - pr|
|00004b60| 6f 74 6f 6e 5f 72 65 63 | 74 2e 6c 65 66 74 3b 0d |oton_rec|t.left;.|
|00004b70| 09 09 68 65 69 67 68 74 | 20 3d 20 70 72 6f 74 6f |..height| = proto|
|00004b80| 6e 5f 72 65 63 74 2e 62 | 6f 74 74 6f 6d 20 2d 20 |n_rect.b|ottom - |
|00004b90| 70 72 6f 74 6f 6e 5f 72 | 65 63 74 2e 74 6f 70 3b |proton_r|ect.top;|
|00004ba0| 0d 09 09 73 69 7a 65 20 | 3d 20 77 69 64 74 68 20 |...size |= width |
|00004bb0| 2a 20 68 65 69 67 68 74 | 3b 0d 09 09 2f 2a 20 61 |* height|;.../* a|
|00004bc0| 6c 6c 6f 63 61 74 65 20 | 6f 66 66 73 63 72 65 65 |llocate |offscree|
|00004bd0| 6e 2d 62 75 66 66 65 72 | 20 62 61 73 65 64 20 6f |n-buffer| based o|
|00004be0| 6e 20 73 69 7a 65 2c 20 | 65 74 63 2e 2a 2f 0d 09 |n size, |etc.*/..|
|00004bf0| 09 70 72 6f 74 6f 6e 5f | 72 65 63 74 2e 74 6f 70 |.proton_|rect.top|
|00004c00| 20 3d 20 30 3b 0d 09 09 | 70 72 6f 74 6f 6e 5f 72 | = 0;...|proton_r|
|00004c10| 65 63 74 2e 6c 65 66 74 | 20 3d 20 30 3b 0d 09 09 |ect.left| = 0;...|
|00004c20| 70 72 6f 74 6f 6e 5f 72 | 65 63 74 2e 62 6f 74 74 |proton_r|ect.bott|
|00004c30| 6f 6d 20 3d 20 68 65 69 | 67 68 74 3b 0d 09 09 70 |om = hei|ght;...p|
|00004c40| 72 6f 74 6f 6e 5f 72 65 | 63 74 2e 72 69 67 68 74 |roton_re|ct.right|
|00004c50| 20 3d 20 77 69 64 74 68 | 3b 0d 09 7d 0d 09 55 70 | = width|;..}..Up|
|00004c60| 44 61 74 65 5f 70 72 6f | 74 6f 6e 20 28 70 72 6f |Date_pro|ton (pro|
|00004c70| 74 6f 6e 5f 57 69 6e 64 | 6f 77 29 3b 0d 7d 0d 0d |ton_Wind|ow);.}..|
|00004c80| 76 6f 69 64 20 63 6c 65 | 61 72 5f 70 72 6f 74 6f |void cle|ar_proto|
|00004c90| 6e 28 29 20 2f 2a 20 21 | 21 21 20 63 68 61 6e 67 |n() /* !|!! chang|
|00004ca0| 65 20 74 68 69 73 20 74 | 6f 20 75 73 65 20 6f 66 |e this t|o use of|
|00004cb0| 66 20 73 63 72 65 65 6e | 20 62 69 74 20 6d 61 70 |f screen| bit map|
|00004cc0| 20 2a 2f 0d 2f 2a 20 22 | 63 75 74 22 20 77 69 74 | */./* "|cut" wit|
|00004cd0| 68 6f 75 74 20 63 6c 69 | 70 62 6f 61 72 64 20 2a |hout cli|pboard *|
|00004ce0| 2f 0d 7b 0d 09 69 66 20 | 28 70 72 6f 74 6f 6e 5f |/.{..if |(proton_|
|00004cf0| 70 69 63 20 21 3d 20 4e | 49 4c 20 29 0d 09 7b 0d |pic != N|IL )..{.|
|00004d00| 09 09 44 69 73 70 6f 73 | 48 61 6e 64 6c 65 28 20 |..Dispos|Handle( |
|00004d10| 28 48 61 6e 64 6c 65 29 | 20 70 72 6f 74 6f 6e 5f |(Handle)| proton_|
|00004d20| 70 69 63 20 29 3b 0d 09 | 7d 0d 09 70 72 6f 74 6f |pic );..|}..proto|
|00004d30| 6e 5f 72 65 63 74 2e 74 | 6f 70 20 3d 20 30 3b 0d |n_rect.t|op = 0;.|
|00004d40| 09 70 72 6f 74 6f 6e 5f | 72 65 63 74 2e 62 6f 74 |.proton_|rect.bot|
|00004d50| 74 6f 6d 20 3d 20 61 6c | 6c 5f 6d 79 5f 63 6f 6c |tom = al|l_my_col|
|00004d60| 6f 72 73 3b 0d 09 70 72 | 6f 74 6f 6e 5f 72 65 63 |ors;..pr|oton_rec|
|00004d70| 74 2e 6c 65 66 74 20 3d | 20 30 3b 0d 09 70 72 6f |t.left =| 0;..pro|
|00004d80| 74 6f 6e 5f 72 65 63 74 | 2e 72 69 67 68 74 20 3d |ton_rect|.right =|
|00004d90| 20 33 30 30 3b 0d 09 55 | 70 44 61 74 65 5f 70 72 | 300;..U|pDate_pr|
|00004da0| 6f 74 6f 6e 20 28 70 72 | 6f 74 6f 6e 5f 57 69 6e |oton (pr|oton_Win|
|00004db0| 64 6f 77 29 3b 0d 7d 0d | 0d 76 6f 69 64 20 63 72 |dow);.}.|.void cr|
|00004dc0| 6f 70 5f 70 72 6f 74 6f | 6e 28 29 0d 7b 0d 0d 7d |op_proto|n().{..}|
|00004dd0| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e00| 00 00 01 00 00 00 01 3c | 00 00 00 3c 00 00 00 5a |.......<|...<...Z|
|00004e10| 39 8f 00 00 00 00 08 00 | 41 62 61 63 75 73 20 0d |9.......|Abacus .|
|00004e20| 00 41 6e 61 6c 6f 67 20 | 43 6c 6f 63 6b 08 00 42 |.Analog |Clock..B|
|00004e30| 0a 53 6f 75 72 63 65 5f | 31 2e 63 63 02 00 00 00 |.Source_|1.cc....|
|00004e40| 54 45 58 54 51 45 44 31 | 00 00 00 00 00 00 00 00 |TEXTQED1|........|
|00004e50| 00 00 54 45 58 54 51 45 | 44 31 00 00 00 00 00 00 |..TEXTQE|D1......|
|00004e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e70| 00 00 a0 c6 6c 62 00 00 | 4d 51 00 00 01 96 69 66 |....lb..|MQ....if|
|00004e80| 79 69 6e 67 20 47 6c 61 | 73 73 0c 00 4d 6f 75 73 |ying Gla|ss..Mous|
|00004e90| 65 20 50 72 69 6e 74 0a | 00 50 6f 6c 79 20 49 64 |e Print.|.Poly Id|
|00004ea0| 6c 65 05 00 52 61 79 73 | 09 00 52 50 4e 20 43 61 |le..Rays|..RPN Ca|
|00004eb0| 6c 63 0a 00 53 63 72 61 | 70 32 4c 69 62 0b 00 53 |lc..Scra|p2Lib..S|
|00004ec0| 63 72 65 65 6e 44 75 6d | 70 0b 00 53 63 72 65 65 |creenDum|p..Scree|
|00004ed0| 6e 53 61 76 65 06 00 54 | 69 6d 65 72 0b 00 a4 75 |nSave..T|imer...u|
|00004ee0| 70 65 72 48 65 6c 70 a5 | 0c 00 a4 75 70 65 72 48 |perHelp.|...uperH|
|00004ef0| 65 6c 70 a5 a5 00 00 00 | 00 00 00 00 00 00 00 00 |elp.....|........|
|00004f00| 00 00 00 2a 00 09 07 4d | 6f 6e 61 63 6f 44 00 00 |...*...M|onacoD..|
|00004f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f30| 00 04 00 06 00 04 00 00 | 00 02 00 00 00 00 01 00 |........|........|
|00004f40| 00 00 01 3c 00 00 00 3c | 00 00 00 5a 00 03 fb 80 |...<...<|...Z....|
|00004f50| 04 6a 00 00 00 1c 00 5a | 00 02 45 46 4e 54 00 00 |.j.....Z|..EFNT..|
|00004f60| 00 1a 45 54 41 42 00 00 | 00 26 45 51 45 44 00 00 |..ETAB..|.&EQED..|
|00004f70| 00 32 03 eb ff ff 00 00 | 00 00 00 00 00 00 03 ec |.2......|........|
|00004f80| ff ff 00 00 00 2e 00 00 | 00 00 03 eb ff ff 00 00 |........|........|
|00004f90| 00 36 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.6......|........|
|00004fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+